Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

how to download/store a file to a local folder from an URL

David A April 26, 2018

Hello!

I'm having serious problems to download and store a PDF file using Xporter and SIL scripting. 

I just want to use Xporter APIS to download the corresponding PDF file to my local hard drive. 

I'm currently using SIL scipting and I tried with everything I found. 

1) attachFileFromURL(url_to_file, issue) (to attach and later download)

2) saveURLToFile(url, file)

3) system() (using Powershell + curl + Invoke, I get error because the parameters part of the URL are being unrecognized by CMD 

 

And more things that I even remember. 

 

Any clue how  can I simply store the file generated by the Xporter API using a script?

http://<JIRA-URL>/plugins/servlet/jiraxporter?issueKey=TEST1-3&outputType=docx&template=Basic%20Release%20Notes

 

Thank you!

 

1 answer

0 votes
Mafalda de Azevedo Mendes May 9, 2018

Hi @David A,

If you already have a scipt you just have to make sure that the option "Allow anonymous requests" is enabled. Do you have this options enabled on Xporter global settings?

 

Best regards,

Xpand Add-Ons Team

David A May 9, 2018

Hello Mafalta, 

 

Thank you for your answer, I tried with this option with no success. Anyway I can't switch on that option as confidential information is open for public just with a link.

Using a script and APIS, it doesn't matter who runs the script, even if its the own jira with administrator rights As its an HTTP its the browser or the server who has to have the rights within the cookies or hashed in the LINK itself, Right?

 

Thanks

Suggest an answer

Log in or Sign up to answer