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

[s3] use slashes for namespace #544

Closed
1 task
jylin opened this issue Dec 27, 2024 · 1 comment · Fixed by #545
Closed
1 task

[s3] use slashes for namespace #544

jylin opened this issue Dec 27, 2024 · 1 comment · Fixed by #545
Labels
enhancement New feature or request

Comments

@jylin
Copy link

jylin commented Dec 27, 2024

Describe the feature

For S3-type storage, slashes are accepted and often used for object keys. Would it be possible to support read/write to keys with slashes?

These 2 places replace slashes with colons, and I checked that commenting those replacements out makes queries for paths with slashes work (haven't tested writes):
https://github.com/unjs/unstorage/blob/main/src/utils.ts#L52
https://github.com/unjs/unstorage/blob/main/src/drivers/utils/index.ts#L18

This would be useful also to be able to access objects written previously not through unstorage that are stored in keys containing slashes (common when using S3 for image hosting).

Additional information

  • Would you be willing to help implement this feature?
@jylin jylin added the enhancement New feature or request label Dec 27, 2024
@pi0 pi0 changed the title Support slashes in keys (e.g. for S3-type storage) [s3] use slashes for namespace Dec 27, 2024
@pi0 pi0 closed this as completed in #545 Dec 27, 2024
@jylin
Copy link
Author

jylin commented Dec 27, 2024

Awesome, incredibly fast turnaround! I just tested the latest release and the reads and writes work for me as expected! Thanks!

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

Successfully merging a pull request may close this issue.

1 participant