I am facing a problem where the content-type always changes during the upload process. I am using lambda and nodejs to generate a URL. Here is my code. I would be grateful for any help!
Your code for generating the Signed URL works ok. The problem seems to be with the actual uploading of the file. Try these options and let's see if you get a better result:
In postman use the binary option and not the form-data
form-data adds a lot of additional values
Create a nodejs file and test with this code
const axios = require('axios');
const fs = require('fs');
(async () => {
const file = fs.readFileSync('./download.mp4');
await axios.put(signedUrl, {
data: file,
}, {
headers: {
'Content-Type': 'video/mp4'
}
});
})();