How to copy a file via API from web directory to a directory on the NAS

Discussion about using NAS on Linux and Unix OS.
Post Reply
jasonw75
First post
Posts: 1
Joined: Sat Apr 25, 2020 2:09 am

How to copy a file via API from web directory to a directory on the NAS

Post by jasonw75 » Sat Apr 25, 2020 2:25 am

Hello,

I'm trying to call the copy file API on my QNAP NAS to copy an image file from an online directory to a directory on the NAS.

Regarding the following GET URL, pointing to my NAS:

http://192.168.125.30:8080/cgi-bin/filemanager/
utilRequest.cgi?func=copy&sid=xxxx&source_file=<FILENAME>
&source_total=1&source_path=<SOURCE thePATH>&dest_path=<DESTINATIONPATH>&mode=1

If I point to a local source (/ShrData/CustomerArtwork), file copy via API works:

http://192.168.125.30:8080/cgi-bin/filemanager/
utilRequest.cgi?func=copy&sid=xxxx&source_file=p07wb9xk.jpg
&source_total=1&source_path=/ShrData/CustomerArtwork&dest_path=/ShrData/Digilase Transfer&mode=1

The file is copied successfully.

But if I point to a path in a web directory as the source:
(https://ichef.bbci.co.uk/wwfeatures/liv ... /p0/7w/b9/),

keeping the filename and source exactly the same, it fails:

http://192.168.125.30:8080/cgi-bin/filemanager/
utilRequest.cgi?func=copy&sid=xxxx&source_file=p07wb9xk.jpg
&source_total=1&source_path=
https://ichef.bbci.co.uk/wwfeatures/liv ... /p0/7w/b9/
&dest_path=/ShrData/Digilase Transfer&mode=1

Here's the web directory and file:

https://ichef.bbci.co.uk/wwfeatures/liv ... 7wb9xk.jpg

Is there a different syntax when pointing to a web directory as the source path/file?

Thanks for any advice!

Post Reply

Return to “Linux & Unix (NFS)”