Log in |
How to change the name of a downloaded fileIntroductionSometimes you may have files which the user can download. However, you might want the default filename that is saved to be different from the id of the file object. This how to illustrates how to store a file object with id "myFile", but when users download the file the saved file name is NewFileName.exe. Create a method to change the saved filename
Upload your file
Test the systemGo to the URL of the file object, eg. http://localhost:8080/myFile and you should be able to download myFile with a different default filename. AcknowledgementsThanks to zxc for pointing the header out to me. |