I want to set the file name on the fly once a download is triggered.
However, the naming function seems to be only relevant for the name the file is stored under.
Is this possible by any chance?
Hello @Mklueh ,
There is two ways (or both) to accomplish this:
download attribute, see exampleContent-Disposition headerTo use download attribute simply add it to links in a template:
<a href="{{file.link}}" download="filename.ext">Download file</a>
To use Content-Disposition header, read this article
@dr-dimitru wow I didn麓t know this was possible through HTML directly, thank you very much!
@Mklueh I'm this one is solved :)
Please, support this project by:
@dr-dimitru Tried it now, download tag doesn麓t do anything and keeps the FileCollection name. Trying Content-Disposition now
Feel free to reopen it in case if the issue still persists on your end.
I麓m using the latest version of Chrome, which should be supported according to that list. Weird
@Mklueh Share how you're using it, your code + chrome devtools screenshot, mb you have a typo somewhere
Feel free to reopen it in case if the issue still persists on your end.
Most helpful comment
Hello @Mklueh ,
There is two ways (or both) to accomplish this:
downloadattribute, see exampleContent-DispositionheaderTo use
downloadattribute simply add it to links in a template:To use
Content-Dispositionheader, read this article