HaschekSolutions/pictshare

CORS issue when uploading via browser

gevera opened this issue · 5 comments

Is there an example of how to upload images via regular form data ?

I've been trying to use pictashare, hoewver getting errors when uploading

Access has been blocked from origin by CORS policy

Are you having these problems on the demo page too? https://pictshare.net

or just on your own hosted instance?

I do have the same issur on https://pictshare.net/ and on my own instance of Pictashare in docker.
Just for reference, i can upload images via Insomnia, Curl or Postman, but not from the browser

oh wait you're not using the interface from pictshare, you try to directly upload from another website?

Thats correct. Using the API

The API is meant to be used by a backend service not a browser since this will always trigger a CORS problem. Better upload from the backend. If you want to upload via the browser, use the built-in upload form of the landing page