Question

How do I make sure Spaces preserves existing metadata for updated files?

Posted June 12, 2019 269 views
CentOS DigitalOcean

Updating assets of the same name and file path within DO-Spaces doesn’t preserve existing metadata settings. How do I ensure it preserves the existing metadata etc?
I am pushing assets to Spaces via s3cmd as recommended in this tutorial:
https://www.digitalocean.com/community/tutorials/how-to-speed-up-wordpress-asset-delivery-using-digitalocean-spaces-cdn#offloading-additional-assets-(optional)

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

1 answer

Unfortunately I don’t think that’s possible through s3cmd today. The best workaround I can this of would be to (a) get the metadata for an object, and then either (b) upload the new object to the same path with that saved metadata OR (b) upload the object first, and then modify / update the metadata of the object subsequently from the saved metadata.

Submit an Answer