Cloudinary upload fails and I see a CORS error

System Information
  • Strapi Version: 4.9.0
  • Operating System: Ubuntu 22.04
  • Database: Postgres
  • Node Version: v16.19.0
  • NPM Version: 8.19.3
  • Yarn Version: 1.22.19

When I try to upload an image to Cloudinary, It fails. I see a console error at the same time.

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://analytics.strapi.io/api/v2/track. (Reason: CORS request did not succeed). Status code: (null).

The error is related to https://analytics.strapi.io/api/v2/track. This seems unrelated to the Cloudinary upload so I’m rather confused. Is this analytics failing and causing the image upload to fail? Is there a way to disable it?

Unfortunately, I see no errors in my Dokku logs, so this is difficult to troubleshoot.

Edit: just found strapi/disable-tracking.md at dd227e2b645901ff35aa8d599ecfe8bae27850ab · strapi/strapi · GitHub I will try and report back

1 Like

Realized client-max-body-size was not set in my nginx config. I set it to 50m and it fixed my Cloudinary uploads.

I was suspicious about the analytics setting so I tried deploying with and without analytics enabled. It had no effect on the uploads either way.