пробовал так
let photo = document.getElementById("photo").files[0];
let formData = new FormData();
formData.append("photo", photo);
fetch('/upload/image', {method: "POST", body: formData});
не получилось
еще так
var alphabet = "abcdefghijklmnopqrstuvwxyz";
var randomIndex = Math.floor(Math.random() * alphabet.length);
////////////////////////////
var randomLetter = alphabet[randomIndex];
var file = document.getElementById("photo");
file.files.item(0).name=md5(randomLetter+file.files.item(0).name);
if(file){
var file1 = fileInput.file;
file1.Move("\files\sphoto\");
}