Strapi 3.0, Node 12
500 error. From reading I’ve read there’s a few things that could cause this.
-
Being the permissions, in my case I’ve set a S3 bucket and confirm it works from dashboard upload.
-
The permissions on the user. In the settings/Roles I’ve granted permissions/upload
My code is:
const fileContent = fs.readFileSync(destFile);
let bodyData = new FormData();
bodyData.append(‘files’, fileContent);axios.post(
http://myip/upload
, bodyData, {
headers: { ‘Content-Type’: ‘multipart/form-data’ },
})
This gives me the 500. Any idea what I’m doing wrong?