I am trying to publish pdf from wix to aws. Wix does not provide node js "fs" package so i am not able to create a readstream of the file.

I am able to connect to AWS but in body of my message i cant find a way to send the file via byte or stream.

Here is the code.
I am getting the file from UI

let files = $w( “#uploadButton3” ).value;

and then sending to my backed AWS program

var upload = new AWS.S3.ManagedUpload({
params: {
Bucket: ‘gill-bucket’ ,
Body :files[0],
Key : “folder/” +Date.now()
}
});

If i change the body to a string then it works. I error i am getting is unsupported body payload.

Hi,
The upload button does not support pdf files at the moment, please submit a feature request here .
Anyway, if you can get the URL of the file you can fetch it and use httpsResponse.buffer() to sent it via rest API.

Or

Hi i have same issue. I want to select file from wix page and upload it on aws. File is not uploaded yet so how can i get Url of that file and use fetch method.