Currently the file extension is derived from Content-Type. However, some media types may have multiple file extensions. The developer may also want to have exact control on the file extension. Asset Gear should have a way to allow the developer to provide the file extension.
One typical use case is that the developer may want to open the URL directly. Some systems use the file extension as a hint to look up suitable application to open the URL.
Content-Disposition is specified in RFC6266. Asset Gear must interpret Content-Disposition according to RFC6266.
During the derivation of file extension, Asset Gear must first look at filename and filename* parameters of Content-Disposition. filename* has precedence over filename. Take the basename of the filename and then extract the file extension from the basename. If the file extension is not empty, it is used. Otherwise continue with the existing mechanism to derive the file extension.
Blog Post Specification
Blog Post of the Feature Release
Open Questions
Put a list of open questions here before a complete design / specification is decided
Description
Currently the file extension is derived from Content-Type. However, some media types may have multiple file extensions. The developer may also want to have exact control on the file extension. Asset Gear should have a way to allow the developer to provide the file extension.
One typical use case is that the developer may want to open the URL directly. Some systems use the file extension as a hint to look up suitable application to open the URL.
Content-Disposition is specified in RFC6266. Asset Gear must interpret Content-Disposition according to RFC6266.
During the derivation of file extension, Asset Gear must first look at
filename
andfilename*
parameters of Content-Disposition.filename*
has precedence overfilename
. Take the basename of the filename and then extract the file extension from the basename. If the file extension is not empty, it is used. Otherwise continue with the existing mechanism to derive the file extension.Blog Post Specification
Blog Post of the Feature Release
Open Questions
Put a list of open questions here before a complete design / specification is decided
Related Issues