Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix s3 proxy New Folder button #1658

Closed
mathis-marcotte opened this issue Apr 26, 2023 · 1 comment
Closed

Fix s3 proxy New Folder button #1658

mathis-marcotte opened this issue Apr 26, 2023 · 1 comment
Assignees

Comments

@mathis-marcotte
Copy link
Contributor

New folders aren't being shown in the UI after being created with the New Folder button, but only when accessing s3proxy through the service directly(with s3proxy-web/s3/namespace/).
The issue is because s3 doesnt display empty directories. To circumvent this, a function was put in place in the service worker js to create an empty file with newly created folders.
And the reason this bug is happening is because the service worker is not being registered in the service. This seems to be because the s3proxy service runs in an unsecure context, but you need a secure context (https) to be able to use service workers.

So to fix this, we could move the logic that creates the empty file out of the service worker. Although if we could possibly list empty directories without the need for a .empty file, that would be the best case scenario for sure.

@mathis-marcotte
Copy link
Contributor Author

The logic for creating the empty files in new folders has been moved from the service worker code to the general js code so that it can always work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant