QRServ allows the downloading of files without placing a file name in the path. To let the browser know what the file name is, the Content-Disposition header carries the file name. The benefit of doing this is that the path could stay perfectly static and the user could reload (or send a request) on each new file selection.
It sounds very fancy and all, but there is a problem with this approach. It's not one-size-fits-all.
In Safari, when requesting media (images, videos), it tries displaying them instead of downloading right away. The browser would not take the file name in the Content-Disposition header when using the download option, meaning it can instead use the hostname as the file name. This is not a great user experience. Plus, some browsers and clients may not check for the header at all.
To resolve this issue, we could have an option to choose if the user wants to include the file name in the path.
QRServ allows the downloading of files without placing a file name in the path. To let the browser know what the file name is, the
Content-Disposition
header carries the file name. The benefit of doing this is that the path could stay perfectly static and the user could reload (or send a request) on each new file selection.It sounds very fancy and all, but there is a problem with this approach. It's not one-size-fits-all. In Safari, when requesting media (images, videos), it tries displaying them instead of downloading right away. The browser would not take the file name in the
Content-Disposition
header when using the download option, meaning it can instead use the hostname as the file name. This is not a great user experience. Plus, some browsers and clients may not check for the header at all.To resolve this issue, we could have an option to choose if the user wants to include the file name in the path.