iroh icon indicating copy to clipboard operation
iroh copied to clipboard

better mime type detection

Open Arqu opened this issue 3 years ago • 1 comments

Currently we do very simple extension/path based mime type detection. Usually that is not enough and we rely on clients and browsers to figure it out on their own. We should do deeper inspection of the data to try and guess the correct mime type. Kubo reference: https://github.com/ipfs/kubo/blob/9c6094e651bd30a11ee7a501bf9aa7eb5cc34deb/core/corehttp/gateway_handler_unixfs_file.go#L48

Arqu avatar Aug 18 '22 19:08 Arqu

I don't know how good it is, but https://docs.rs/mime_classifier/0.0.1/mime_classifier/ could be used for that.

fabricedesre avatar Aug 18 '22 20:08 fabricedesre