docs/src/put.md

Wed, 08 May 2019 19:34:35 +0200

author
Mike Becker <universe@uap-core.de>
date
Wed, 08 May 2019 19:34:35 +0200
changeset 591
793af8666b3a
parent 285
02d3e4b1245f
permissions
-rw-r--r--

fixes missing url encoding in dav_session_get_href() with enabled name decryption

---
title: 'dav put'
---

**`dav put [-pcR] [-k <key>] [-L <lock>] <url> <file>`**

Uploads a file or a directory. When uploading a file while the url points to
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
created.

When uploading a directory, you need to specify the **`-R`** option. It uploads
all files in the directory to the specified url, but it does not create a
collection for the directory itself.
You may use [dav mkdir][1] to create this collection beforehand.

**`-p`** disable file name encryption and decryption

**`-c`** enable file name and content encryption

**`-R`** upload directory

**`-k <key>`** use the specified key for encryption. The key must be configured in
  the config.xml file

**`-L <lock>`** use a lock token. See [dav lock][2]

[1]: ./mkdir.html
[2]: ./lock.html

mercurial