Answer the question
In order to leave comments, you need to log in
How to use the COPY method in WebDAV (nginx)?
There is the following problem:
When trying to copy the /from.png file using cURL to another directory using the COPY method, nginx swears.
nginx config:
location ~ ^/path/.+\.png {
root /mnt/path/to/;
client_max_body_size 2m;
dav_methods PUT DELETE COPY;
create_full_put_path on;
dav_access group:rw all:r;
}
> COPY /path/dir/file.png HTTP/1.1
Host: localhost
Accept: */*
Destination: http://localhost/path/dir2/file2.png
< HTTP/1.1 500 Internal Server Error
< Server: nginx/1.10.0 (Ubuntu)
< Date: Fri, 25 Nov 2016 07:38:53 GMT
< Content-Type: text/html
< Content-Length: 202
< Connection: close
<
* Closing connection 0
2016/11/25 14:38:53 [crit] 12205#12205: *626 open() "/mnt/path/to/path/dir2/file2.png" failed (2: No such file or directory), client: 127.0.0.1, server: localhost, request: "COPY /path/dir/file.png HTTP/1.1", host: "localhost"
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question