radula icon indicating copy to clipboard operation
radula copied to clipboard

set http header for file

Open alifaaz opened this issue 4 years ago • 1 comments

I wonder if there is any way to set HTTP header for a file on upload or after it like I can set a file to be publicly read after upload how I do so for HTTP header?

alifaaz avatar Apr 13 '20 13:04 alifaaz

RadosGW objects have 8kb to store metadata (doc page), which is the closest we get to being able to include additional arbitrary data.

One good thing about it is that we get the metadata from HEAD requests without fetching the entire object. The down side is that (if object versioning is disabled), metadata can only be set once at the time of upload.

radula uses this metadata exclusively for its own purposes; mainly chunk settings for multi-part uploads so that the hash comparisons between local and remote files can be done consistently. It does not leave any doors open for users to add their own metadata.

But, if one were determined to include user-metadata in their uploads, the code block to target insertion is here: https://github.com/bibby/radula/blob/master/radula/rad.py#L783-L787 , and then be backtracked from the arg parser all the way through the to the various upload functions.

bibby avatar Apr 13 '20 19:04 bibby