Closed boramalper closed 3 years ago
I've done this in the past on another project for the same reasons. I settled on using Content-Disposition: filename=
+strconv.Quote(path.Base(...))
. Inline and attachment added meaning that the browser would infer more correctly. I didn't get into the weeds with filename*
, as this method worked the way I wanted for all the cases I tried.
@anacrolix Changed as advised, let me know how it looks now.
IPFS gateways accepts
filename
query option to allow users to lazily "rename" the files upon access. This is not a must for a BitTorrent gateway since the filenames we deal with are not cryptographic hashes, though given the support for partial requests, there are cases where it makes sense to be able to rename the data (e.g. accessing subtitles in a ZIP container).Signed-off-by: Bora M. Alper bora@boramalper.org