Forum Discussion
LauraShelley
7 years agoQrew 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.
LauraShelley
7 years agoQrew Member
Thank you, but I'm trying to use a Rich Text Formula field to create a download link, as you had indicated in your first response to the original question, so I don't think I can incorporate javascript in this case. Is there any way to rename a .jpg file for download using a Rich Text Formula field?