Friends, Countrymen, Lend me your ears...
I'm signing my url for amazon s3, and then using fileReader and Fetch to put my file in s3. Though when I do I get a fun white square instead of my image: https://s3.amazonaws.com/hubbble/Gabe/lX4H0.png
const reader = new FileReader();
reader.onload = ((e) => {
let s3headers = new Headers();
s3headers.append("content-type", 'image/png');
fetch(signedRequest, {
method: 'PUT',
headers: s3headers,
body: e.currentTarget.result
}).then((response)=>{
console.log(response);
});
});
- Permissions Issue? Don't really think so as you can definitely view the image
- Corrupted somehow?
- Maybe an incorrect content type?
Thoughts? Thanks for any guidance, been banging my head against the wall on this!