rzane / file_store

🗄️ A unified interface for file storage backends
MIT License
19 stars 3 forks source link

Create a prefix middleware #19

Closed rzane closed 3 years ago

rzane commented 3 years ago

This middleware will prepend a prefix to the key. This is useful, because it means the S3 adapter doesn't have to worry about the prefix. It also means that prefixing is now compatible with any adapter.

This PR includes a breaking change to the S3 adapter. The prefix option is no longer accepted by the S3 adapter.

In previous versions, using the :prefix would still return unprefixed keys from the list! and stat functions. That's no longer the case, which means the result of those functions can be used to interact with the store.