[GH-ISSUE #1603] Document upload via GUI fails with CORS error when using S3 #446

Closed
opened 2026-02-26 18:47:05 +03:00 by kerem · 4 comments
Owner

Originally created by @Tim-Ganther on GitHub (Jan 22, 2025).
Original GitHub issue: https://github.com/documenso/documenso/issues/1603

I've deployed documenso (latest release) using docker compose and configured the environment variables according to the documentation to store files in S3 instead of the database. The S3 bucket is hosted using Hetzner.

The server side logs do not show any error or message upon file upload via GUI. On the GUI I get a generic error message, that there has been an error during file upload.

Inspecting the browser console reveals a CORS error... it seems like documenso generates a pre-signed url to upload a file to S3 and executes that upload directly via the frontend which does not send any CORS headers etc and therefore the S3 bucket throws the CORS error.

I am seeking for help to resolve this error.

Originally created by @Tim-Ganther on GitHub (Jan 22, 2025). Original GitHub issue: https://github.com/documenso/documenso/issues/1603 I've deployed documenso (latest release) using docker compose and configured the environment variables according to the documentation to store files in S3 instead of the database. The S3 bucket is hosted using Hetzner. The server side logs do not show any error or message upon file upload via GUI. On the GUI I get a generic error message, that there has been an error during file upload. Inspecting the browser console reveals a CORS error... it seems like documenso generates a pre-signed url to upload a file to S3 and executes that upload directly via the frontend which does not send any CORS headers etc and therefore the S3 bucket throws the CORS error. I am seeking for help to resolve this error.
kerem 2026-02-26 18:47:05 +03:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 22, 2025):

Thank you for opening your first issue and for being a part of the open signing revolution!

One of our team members will review it and get back to you as soon as it possible 💚

Meanwhile, please feel free to hop into our community in Discord

<!-- gh-comment-id:2608074603 --> @github-actions[bot] commented on GitHub (Jan 22, 2025): Thank you for opening your first issue and for being a part of the open signing revolution! <br /> One of our team members will review it and get back to you as soon as it possible 💚 <br /> Meanwhile, please feel free to hop into our community in [Discord](https://documen.so/discord)
Author
Owner

@henryhuangh commented on GitHub (Jan 28, 2025):

@Tim-Ganther got the same issue, fixed it by changing the cors configuration on s3

<!-- gh-comment-id:2620289288 --> @henryhuangh commented on GitHub (Jan 28, 2025): @Tim-Ganther got the same issue, fixed it by changing the cors configuration on s3
Author
Owner

@ephraimduncan commented on GitHub (Jan 29, 2025):

To fix this, you need to configure CORS settings on your Hetzner S3 bucket.

Here's a documentation on how you can do it: https://docs.hetzner.com/storage/object-storage/howto-protect-objects/cors/#:~:text=In%20order%20for%20Cross%2DOrigin,set%20it%20to%20%22Public%22.

<!-- gh-comment-id:2620952455 --> @ephraimduncan commented on GitHub (Jan 29, 2025): To fix this, you need to configure CORS settings on your Hetzner S3 bucket. Here's a documentation on how you can do it: https://docs.hetzner.com/storage/object-storage/howto-protect-objects/cors/#:~:text=In%20order%20for%20Cross%2DOrigin,set%20it%20to%20%22Public%22.
Author
Owner

@catalinpit commented on GitHub (Feb 4, 2025):

I assume this is solved then.

<!-- gh-comment-id:2633686217 --> @catalinpit commented on GitHub (Feb 4, 2025): I assume this is solved then.
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/documenso#446
No description provided.