I am using FileTransfer plugin to download a file. But I want to keep the original filename of the file but not a one I assigned. Can I keep the original file name when downloading it?
ie. I don’t want to change 'file.pdf' manually in below code:
PS. My url will not contain any file name (will be something like: https://example.com/<id>?sp=r&st=2020-07-22&sig=<other-id>&srt=o&ss=b ) so it is quite not possible to get the filename from the url. But if open the link in browser, I can download it with a meaningful filename.
I am using FileTransfer plugin to download a file. But I want to keep the original filename of the file but not a one I assigned. Can I keep the original file name when downloading it?
ie. I don’t want to change
'file.pdf'
manually in below code:fileTransfer.download(url, this.file.dataDirectory + 'file.pdf')
Thanks
PS. My url will not contain any file name (will be something like:
https://example.com/<id>?sp=r&st=2020-07-22&sig=<other-id>&srt=o&ss=b
) so it is quite not possible to get the filename from the url. But if open the link in browser, I can download it with a meaningful filename.