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
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
The text was updated successfully, but these errors were encountered:
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.
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
The text was updated successfully, but these errors were encountered: