Question

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

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)


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

that’s a bummer! how beautiful would be that when you upload a file to ask you: keep metadata or reset…

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.