Changing a Tigris key's MIME type - Tigris

Changing a Tigris key's MIME type

I need to be able to change the MIME content type of a key after creating it in Tigris.

The AWS API is extremely poorly designed and doesn’t provide a means of editing metadata of a key after creation; however, one workaround used with S3 is calling CopyObject and setting the source and destination to the same key with a new ContentType specified. This workaround incurs a cost but at least allows the content type to be updated. Unfortunately, this approach does not appear to work with the Tigris API.

Can anyone advise on a way to resolve this or suggest another possible workaround? I’ve been impressed with Tigris so far, but the AWS API (and its periodic divergences from compatibility) are causing issues.

Solution

however, one of the workarounds I’ve used with S3 was calling CopyObject and setting the source and destination to the same key, with a new ContentType specified. This workar

That workaround should work for Tigris as well. Could you try by passing the header x-amz-metadata-directive with the value REPLACE (i.e., x-amz-metadata-directive:REPLACE) and include all the headers you need? Then it will perform the copy operation while honoring the metadata in the copy request. Basically, if this header isn’t specified, the default directive is COPY, which means copying all the metadata from the source key, and since source and destination are the same that’s why you were seeing the error.

Please let me know if this works.

Dr. Judah Schuster•1/21/26, 3:01 PM

Please let me know if this works.

Dr. Juvenal Schmitt OP•1/21/26, 3:01 PM

Thanks for the super fast reply! I’ll give this a shot right now. Stand by…

Dr. Juvenal Schmitt OP•1/21/26, 3:01 PM

That does, in fact, work! Thank you. Every time I discover some new, terrible facet of the AWS API like this I am amazed that folks like you guys have dedicated time to replicating it.

I really appreciate your help, and the blazing‑fast response

Dr. Judah Schuster OP•1/21/26, 3:01 PM

Glad to hear it :smile:

Prof. Hertha Jacobson OP•1/21/26, 3:01 PM

Yeah the S3 api is not very use friendly in many aspects. We do plan on enhancing the API, i.e. supporting the S3 API like we do today but extending it to make it more user friendly.

Dr. Juvenal Schmitt OP•1/21/26, 3:01 PM

Not that my opinion here matters, but: I think you guys would probably be much better off designing your own API from scratch and offering the AWS API in parallel. The functionality provided by S3 is reasonably straightforward to model using REST semantics, and it would be so nice to see lightweight, sane client libraries – especially for Python (lol). I’m assuming that’s a pretty massive engineering effort on your end, but I suspect Tigris’s use of FDB means there’s a ton of interesting functionality you could provide if your hands weren’t tied by Amazon’s poor API design and client library implementations.

As an aside: I’m really looking forward to being able to designate an index.html for public buckets. Would be nice to serve my static site directly from Tigris.

I’m enjoying Tigris, thus far! Keep up the good work :wink:

Prof. Hertha Jacobson OP•1/21/26, 3:01 PM

S3’s API design does tie our hands. But we have to have the API compatibility. It makes it easier for folks to adopt us. There are so many products/tools/libraries that work with S3 API, and folks are used to it. So it is better to start off with S3 API as the base and then build extensions. The extensions to the API do not necessarily have to follow S3’s API design.

And yes, you are right, FDB allows us the ability to offer a lot of interesting functionality, such as secondary indexes on objects, etc. We will be building this functionality and make it available through API extensions. But who knows, maybe we will offer an alternate API as well.

"Ability to designate an index.html for public buckets" – this is planned. It’s just that there is other high‑priority work we are focusing on at the moment (storage tiers, object notification, etc).

I am glad you are enjoying Tigris. Keep the feedback coming