UNIXworkcode

1 --- 2 title: 'dav put' 3 --- 4 5 **`dav put [-pcR] [-k <key>] [-L <lock>] <url> <file>`** 6 7 Uploads a file or a directory. When uploading a file while the url points to 8 an existing collection, a resource inside this collection with the file's name is created. When the url points to a non-existing resource, the resource is 9 created. 10 11 When uploading a directory, you need to specify the **`-R`** option. It uploads 12 all files in the directory to the specified url, but it does not create a 13 collection for the directory itself. 14 You may use [dav mkdir][1] to create this collection beforehand. 15 16 **`-p`** disable file name encryption and decryption 17 18 **`-c`** enable file name and content encryption 19 20 **`-R`** upload directory 21 22 **`-k <key>`** use the specified key for encryption. The key must be configured in 23 the config.xml file 24 25 **`-L <lock>`** use a lock token. See [dav lock][2] 26 27 [1]: ./mkdir.html 28 [2]: ./lock.html 29 30 31