Getting "Network Error" while uploading an image to strapi from a url

System Information
  • Strapi Version: v4.2.0
  • Operating System: macOS
  • Database: mySQL
  • Node Version: 16.14.2
  • NPM Version: 8.5.0
  • Yarn Version: 1.22.18

Hi,
I am trying to upload an image from a public url (which anyone can access), but while trying to do so, I am getting some “Network error” and I get nothing in the console for the same.

this is how it looks:

5 Likes

I have same issue. What is the exact problem?

I have same problem…

If you open up the network debug panel during the upload attempt, you can see Strapi attempting to fetch that resource on your behalf. The error that I got was a CORS error, and I resolved it by opening up the Nginx configs for my static file serves and adding in all the CORS headers in the response.

There was another issue with Nginx’s client_max_body_size directive being too low, had to increase that limit to match my files.

Can u tell me how u did it

Hey,

I having exactly the same issue. Trying to add URL for my images as heroku doesn’t store them.
Anyone succedeed ?

Thanks,

As of now you just have to update your @strapi/strapi version to latest to solve this issue.