You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It could be useful to have an option allowing files to have metadata associated with them on upload. I'm running into a situation where we'd like to attach different http cache-control headers to files, based on their file extensions.
I imagine the API could involve passing a metadata dict, mapping filename matching regex patterns to a list of key-value tuples defining the metadata.
Any thoughts before I attempt this?
The text was updated successfully, but these errors were encountered:
Assuming you're referring to this metadata, I think passing a dict into the programmatic API works fine.
If you want to implement a command line --option for it as well, I'd suggest using a dict-friendly file format like JSON or YAML as the argument, which would then be passed through to the API.
If you'd like more complex behaviors, I think adding the ability to register before and after hooks, which would be able to modify the Key (and probably also be passed the original filename), would be a solid approach.
It could be useful to have an option allowing files to have metadata associated with them on upload. I'm running into a situation where we'd like to attach different http cache-control headers to files, based on their file extensions.
I imagine the API could involve passing a metadata dict, mapping filename matching regex patterns to a list of key-value tuples defining the metadata.
Any thoughts before I attempt this?
The text was updated successfully, but these errors were encountered: