[GH-ISSUE #139] CORS issue when uploading via browser #110

Closed
opened 2026-02-25 23:40:43 +03:00 by kerem · 5 comments
Owner

Originally created by @gevera on GitHub (May 11, 2022).
Original GitHub issue: https://github.com/HaschekSolutions/pictshare/issues/139

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

Originally created by @gevera on GitHub (May 11, 2022). Original GitHub issue: https://github.com/HaschekSolutions/pictshare/issues/139 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`
kerem closed this issue 2026-02-25 23:40:43 +03:00
Author
Owner

@geek-at commented on GitHub (May 11, 2022):

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

or just on your own hosted instance?

<!-- gh-comment-id:1123388988 --> @geek-at commented on GitHub (May 11, 2022): Are you having these problems on the demo page too? https://pictshare.net or just on your own hosted instance?
Author
Owner

@gevera commented on GitHub (May 11, 2022):

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

<!-- gh-comment-id:1123582361 --> @gevera commented on GitHub (May 11, 2022): 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
Author
Owner

@geek-at commented on GitHub (May 11, 2022):

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

<!-- gh-comment-id:1123640022 --> @geek-at commented on GitHub (May 11, 2022): oh wait you're not using the interface from pictshare, you try to directly upload from another website?
Author
Owner

@gevera commented on GitHub (May 11, 2022):

Thats correct. Using the API

<!-- gh-comment-id:1123653535 --> @gevera commented on GitHub (May 11, 2022): Thats correct. Using the API
Author
Owner

@geek-at commented on GitHub (May 11, 2022):

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

<!-- gh-comment-id:1124296924 --> @geek-at commented on GitHub (May 11, 2022): 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
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/pictshare#110
No description provided.