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

Set metadata for multiple objects? #609

Open
kirkre opened this issue May 15, 2016 · 3 comments
Open

Set metadata for multiple objects? #609

kirkre opened this issue May 15, 2016 · 3 comments

Comments

@kirkre
Copy link

kirkre commented May 15, 2016

Is there a method to set the metadata for multiple objects at once? Being able to add a metadata pair for every object in a folder would be ideal. I need to add an Access-Control-Allow-Origin header for HLS video files, with thousands of files in a folder.

Thanks,

Kirk

@kirkre
Copy link
Author

kirkre commented May 15, 2016

On cloud files that is, which you can guess but I should have mentioned.

@briancurtin
Copy link
Contributor

There is nothing like this available in Pyrax.

@kirkre
Copy link
Author

kirkre commented May 18, 2016

Thanks Brian. After trying set_object_metadata using a for loop to do an entire 1500 file folder, I don't think a function that does a whole folder at once would help either way. Purging the files is difficult, and I find the X-Object-Meta- prefix added by this function prevents CORS headers from being recognized in browsers. I found a discussion from two years ago where people reported this prefix did work with CORS headers, but not for me in any browser. Perhaps the browsers have changed criteria?

Setting the metadata on object creation works much better. Upload_file does not add a prefix to the metadata so the CORS headers do work, and no need to purge. Now I can't help wondering, do the functions sync_folder_to_container and/or upload_folder support adding headers on object creation? If I remember right those functions are much faster than uploading file by file, and it could be simpler to use than a for loop.

Thanks,

Kirk

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

2 participants