Upload via api getting 500 error

Strapi 3.0, Node 12

500 error. From reading I’ve read there’s a few things that could cause this.

  1. Being the permissions, in my case I’ve set a S3 bucket and confirm it works from dashboard upload.

  2. 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?

Can you please provide the error response from the server backend side, 500 errors don’t give context to the user as that would be a security risk.

This was a 500 error on my end nothing to do with Strapi (obviously)

Glad you got it figured out! :smiley: