Fossil User Forum

download of attachments to wiki pages and tech notes no longer supply the filename
Login

download of attachments to wiki pages and tech notes no longer supply the filename

download of attachments to wiki pages and tech notes no longer supply the filename

(1) By David Vines (djvines) on 2020-06-04 09:31:53 [link] [source]

When I download an attachment from either a wiki page or from a tech note the browser no longer supplies the file name as it used to. This is due to the download link on the artifact page no longer including the file name.

Looking at the code in info.c I can see that it recently changed, but I'm unsure as to the intent and hence unsure what to suggest as a fix. Any thoughts?

(2) By David Vines (djvines) on 2020-06-07 08:23:58 in reply to 1 [source]

Looking at the source code at https://fossil-scm.org/fossil/file?udc=1&ln=2331&ci=tip&name=src%2Finfo.c the code refers to zName which can either be the file name or it can be the artifact hash.

Is there a preference as to whether the code should be checking for isFile as shown in the block of code a few lines earlier in the code decide between using zName or blob_str(&downloadName) or should it just use blob_str(&downloadName) as it does just below this line of code to determine the mimetype?