Usually when downloading files, suppose using QNetworkAccessManager, the filename is not present at the end of link. How to get proper file names in that case. Even if link doesn’t contain a hint of name, firefox always downloads the file with its proper name and extension. We can get a hint of extention using mime-types but what about file names.
Usually when downloading files, suppose using QNetworkAccessManager, the filename is not present at the
Share
Yes. It’s the
Content-Disposition: attachment; filename=<file name.ext>header. There’s a strong suggestion to set the content type toapplication/octet-streamso browsers and their plugins are not tempted to open it instead.