Answer the question
In order to leave comments, you need to log in
How to copy a file available via http to a webdav server without downloading it to your computer?
The point is this.
There is a file located on the website at site.ru/file.txt.
There is a webdav server (for example, a Yandex disk) to which I want to download the file.txt file, without downloading it to my computer.
Tried to do like this:
curl -u $auth -X COPY -H 'Destination: $durl' $rurl
Answer the question
In order to leave comments, you need to log in
means Not Allowed
webdav is waiting for a set of bytes - the body of the file, it does not know how to do it differently
The answer to your question is in the question itself. You create 2 clients, the first one downloads, the second uploads, you set the volume of the intermediate buffer yourself. In theory, the same curl allows you to direct the stream to stdout using pipe, you can send its output to the input stream of another program. By the way, in ftp there is an output switch command when the client tells server b to download a file from server a
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question