iroh
iroh copied to clipboard
better mime type detection
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
I don't know how good it is, but https://docs.rs/mime_classifier/0.0.1/mime_classifier/ could be used for that.