Uploading file to s3 using presigned-URL
问题 I'm trying to upload a file in my s3 bucket with a aws presigned-URL. Here is my js function function UploadObjectUsingPresignedURL() { var file = document.getElementById('customFile').files[0]; console.log(file); var xhr = new XMLHttpRequest(); xhr.open('PUT', 'hereMyPresignedURL', true); //xhr.setRequestHeader('Content-Type', 'image/jpeg'); xhr.onload = () => { if (xhr.status === 200) { console.log('Uploaded data successfully'); } }; xhr.onerror = () => { console.log('Nope') }; xhr.send