Forum Discussion
LauraShelley
Qrew Member
Dan, unfortunately your solution above doesn't seem to work properly with .jpg files for some reason. I'm not sure if Quickbase handles photo files differently or what...
I tried it the original way you have above, which resulted in an unreadable .jpg file named myfile.jpg.
I also tried this:
var Text fileExtension = Part([Photo], 2, ".");
"<a href='" & URLRoot() & "up/" & Dbid() & "/a/r" & [Record ID#] & "/e6/v0/' download='myfile." & $fileExtension & "'>Download Photo</a>"
This resulted in a download of the original file (not renamed). I'm using Chrome.
I tried it the original way you have above, which resulted in an unreadable .jpg file named myfile.jpg.
I also tried this:
var Text fileExtension = Part([Photo], 2, ".");
"<a href='" & URLRoot() & "up/" & Dbid() & "/a/r" & [Record ID#] & "/e6/v0/' download='myfile." & $fileExtension & "'>Download Photo</a>"
This resulted in a download of the original file (not renamed). I'm using Chrome.
_anomDiebolt_
6 years agoQrew Elite
BTW, the reason the download attribute does not work is because QuickBase sets the Content-Disposition header which has a higher priority in naming the file.