Hello everyone,
In my personal folder, which you can see in the image below, I have images in PNG format that I would like to download automatically with code.
If I right click on one of the images and choose download I can see the link that is generated.
The part between sessions and workspace changes with each new connection.
How to do with proc http ?
Thanks.
Hi @MaT721 ,
I am not sure if what I am suggesting is the best way but I think it will work...you can use the SAS Viya REST API to create a compute server session and then submit SAS code which assigns a fileref that points to your image that you want to download and then download it using this API: https://developer.sas.com/apis/rest/v3.5/Compute/#download-a-file
Another option which I am not sure will work is to somehow use the Files API but I am not sure if it can be used to access files on disk or just files in the SAS Content Server.
HTH,
Eyal
Hi @MaT721 ,
I am not sure if what I am suggesting is the best way but I think it will work...you can use the SAS Viya REST API to create a compute server session and then submit SAS code which assigns a fileref that points to your image that you want to download and then download it using this API: https://developer.sas.com/apis/rest/v3.5/Compute/#download-a-file
Another option which I am not sure will work is to somehow use the Files API but I am not sure if it can be used to access files on disk or just files in the SAS Content Server.
HTH,
Eyal
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.