Hi Oleg,
We are downloading a file with a filename (returned as part of the HTTP response in the Content-Disposition header) that contains a special character: a double quote. RoboTask is not able to save the file to disk.
What is surprising is that the issue persists even if you manually set a filename using the option "Save As Filename". Perhaps RoboTask first tries to save the file with the "default" filename and then rename it?
Kind regards,
Juanlu.
Action "Download Files": Save As Filename not working
Re: Action "Download Files": Save As Filename not working
Double-quote symbol is prohibited symbol in filenames.
We'll check the action and make corrections if it's necessary.
We'll check the action and make corrections if it's necessary.
Oleg Yershov
Re: Action "Download Files": Save As Filename not working
Hi Oleg,
We are now seeing a different issue in the same "Save As Filename" option. Now we are testing with a file with a correct name (meaning, without quotes).
RoboTask is able to save the file. But the file gets the name received from the HTTP response, and not the filename set by the "Save As Filename" option, which is being ignored by some reason.
Here is my task (it is using an endpoint in Mocky.io which returns a very simple pdf file: http://www.mocky.io/v2/5dd1055f3200004e0006f9ea)
We are now seeing a different issue in the same "Save As Filename" option. Now we are testing with a file with a correct name (meaning, without quotes).
RoboTask is able to save the file. But the file gets the name received from the HTTP response, and not the filename set by the "Save As Filename" option, which is being ignored by some reason.
Here is my task (it is using an endpoint in Mocky.io which returns a very simple pdf file: http://www.mocky.io/v2/5dd1055f3200004e0006f9ea)
Code: Select all
;*****************************
;* RoboTask Task file
;* Do not edit in text editor!
;*****************************
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|880733562
Comment=STRINGLIST
ContinueOnError=INTEGER|0
DoNotStopWhenShutdown=INTEGER|0
ExternalName=STRING|"Download_File_from_REST_API_using_a_HTTPS_endpoint_and_Basic_Authorization"
Hide=INTEGER|0
ID=INTEGER|1055480561
LocalVariables=STRING|"Folder_Path=C:\Users\MY_USER\Downloads,File_ID=TEST_FILE_ID,Mocky_Avendoo_Certification_Download_URL=http://www.mocky.io/v2/5dd1055f3200004e0006f9ea,Mocky_Avendoo_Password=Fake_Password,Mocky_Avendoo_Username=Fake_Username,Mocky_Certification_File_Name=file_{File_ID}.pdf"
LogOnAsUser=INTEGER|1
Name=STRING|"Download File from REST API using a HTTPS endpoint and Basic Authorization"
OnErrorTaskID=INTEGER|-1
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
UnicodeFormat=INTEGER|0
WriteGeneralLog=INTEGER|0
[Actions]
Action1=FOLDER
[Actions\Action1]
ActionID=STRING|"A_INET_DOWNLOAD"
Enabled=INTEGER|-1
Name=STRING|"Download files and save in ""{Folder_Path}"""
Params=FOLDER
[Actions\Action1\Params]
action=STRING|"1"
authorization=STRING|"1"
file0=STRING|"{Mocky_Avendoo_Certification_Download_URL}"
filecount=STRING|"1"
password=STRING|"31651286322763024580304122840028655245702505129694286742585300264"
proxykind=STRING|"0"
saveas=STRING|"1"
saveasname=STRING|"{Mocky_Certification_File_Name}"
savedir=STRING|"{Folder_Path}"
useproxy=STRING|"0"
username=STRING|"{Mocky_Avendoo_Username}"
Re: Action "Download Files": Save As Filename not working
We have found the problem and fixed it.
Download and install fresh copy please: http://robotask.com/downloads/RobotaskSetup.exe
Download and install fresh copy please: http://robotask.com/downloads/RobotaskSetup.exe
Oleg Yershov
Re: Action "Download Files": Save As Filename not working
It works! Thanks a lot!