### Actual behaviour
- Uploading files to external storage folder (WebDAV with …encryption activated) is not working from the app, but works fine on the website. I only get a upload failed notification and sometimes (but not always) unreadable files in the folder.
### Expected behaviour
- should upload to the external storage folder
### Steps to reproduce
1. as admin: setup external storage support
2. as user: add external webdav storage with encryption activated
3. as user: upload file to the external webdav storage with the Android app
### Environment data
Android version: 7.1.2
Device model: Google Nexus 5
Stock or customized system: Official LineageOS 14.1
Nextcloud app version: 3.0.3
Nextcloud server version: 13.0
### Logs
#### Web server error log
no logs available
#### Nextcloud log (data/nextcloud.log)
```
{"reqId":"Wp@n-XQJW97uwGVhECKeLwAAAJI","level":3,"time":"2018-03-07T08:51:10+00:00","remoteAddr":"<redacted>","user":"<username>","app":"no app in context","method":"PUT","url":"\/remote.php\/webdav\/1und1\/IMG_20180307_074531%20(2).jpg-chunking-1770243853-3-2","message":"Exception: {\"Exception\":\"Sabre\\\\HTTP\\\\ClientException\",\"Message\":\"PROPPATCH failed. The following properties errored: {DAV:}lastmodified (403)\",\"Code\":0,\"Trace\":\"#0 \\\<installdir>\\\/lib\\\/private\\\/Files\\\/Storage\\\/DAV.php(450): Sabre\\\\DAV\\\\Client->propPatch('https:\\\/\\\/sd2dav....', Array)\\n#1 \\\<installdir>\\\/lib\\\/private\\\/Files\\\/Storage\\\/Wrapper\\\/Wrapper.php(353): OC\\\\Files\\\\Storage\\\\DAV->touch('IMG_20180307_07...', 1520412664)\\n#2 \\\<installdir>\\\/lib\\\/private\\\/Files\\\/Storage\\\/Wrapper\\\/PermissionsMask.php(100): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Wrapper->touch('IMG_20180307_07...', 1520412664)\\n#3 \\\<installdir>\\\/lib\\\/private\\\/Files\\\/Storage\\\/Wrapper\\\/Wrapper.php(353): OC\\\\Files\\\\Storage\\\\Wrapper\\\\PermissionsMask->touch('IMG_20180307_07...', 1520412664)\\n#4 \\\<installdir>\\\/lib\\\/private\\\/Files\\\/Storage\\\/Wrapper\\\/Availability.php(376): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Wrapper->touch('IMG_20180307_07...', 1520412664)\\n#5 \\\<installdir>\\\/lib\\\/private\\\/Files\\\/Storage\\\/Wrapper\\\/Wrapper.php(353): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Availability->touch('IMG_20180307_07...', 1520412664)\\n#6 \\\<installdir>\\\/lib\\\/private\\\/Files\\\/Storage\\\/Wrapper\\\/Wrapper.php(353): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Wrapper->touch('IMG_20180307_07...', 1520412664)\\n#7 \\\<installdir>\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/File.php(494): OC\\\\Files\\\\Storage\\\\Wrapper\\\\Wrapper->touch('IMG_20180307_07...', 1520412664)\\n#8 \\\<installdir>\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/File.php(132): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\File->createFileChunked(Resource id #94)\\n#9 \\\<installdir>\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/Directory.php(151): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\File->put(Resource id #94)\\n#10 \\\<installdir>\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(1096): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\Directory->createFile('IMG_20180307_07...', Resource id #94)\\n#11 \\\<installdir>\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/CorePlugin.php(525): Sabre\\\\DAV\\\\Server->createFile('1und1\\\/IMG_20180...', Resource id #94, NULL)\\n#12 [internal function]: Sabre\\\\DAV\\\\CorePlugin->httpPut(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#13 \\\<installdir>\\\/3rdparty\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#14 \\\<installdir>\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(479): Sabre\\\\Event\\\\EventEmitter->emit('method:PUT', Array)\\n#15 \\\<installdir>\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(254): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#16 \\\<installdir>\\\/apps\\\/dav\\\/appinfo\\\/v1\\\/webdav.php(80): Sabre\\\\DAV\\\\Server->exec()\\n#17 \\\<installdir>\\\/remote.php(164): require_once('\\\/var\\\/www\\\/virtua...')\\n#18 {main}\",\"File\":\"\\\<installdir>\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Client.php\",\"Line\":306}","userAgent":"Mozilla\/5.0 (Android) ownCloud-android\/3.0.3","version":"13.0.0.14"}
{"reqId":"Wp@n-XQJW97uwGVhECKeLwAAAJI","level":3,"time":"2018-03-07T08:51:10+00:00","remoteAddr":"<redacted>","user":"<username>","app":"files_external","method":"PUT","url":"\/remote.php\/webdav\/1und1\/IMG_20180307_074531%20(2).jpg-chunking-1770243853-3-2","message":"PROPPATCH failed. The following properties errored: {DAV:}lastmodified (403)","userAgent":"Mozilla\/5.0 (Android) ownCloud-android\/3.0.3","version":"13.0.0.14"}
{"reqId":"Wp@n-XQJW97uwGVhECKeLwAAAJI","level":4,"time":"2018-03-07T08:51:10+00:00","remoteAddr":"<redacted>","user":"<username>","app":"webdav","method":"PUT","url":"\/remote.php\/webdav\/1und1\/IMG_20180307_074531%20(2).jpg-chunking-1770243853-3-2","message":"Exception: {\"Exception\":\"Sabre\\\\DAV\\\\Exception\",\"Message\":\"1und1\\\/IMG_20180307_074531 (2).jpg not found while trying to get owner\",\"Code\":0,\"Trace\":\"#0 \\\<installdir>\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/File.php(134): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\File->convertToSabreException(Object(OCP\\\\Files\\\\NotFoundException))\\n#1 \\\<installdir>\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/Directory.php(151): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\File->put(Resource id #94)\\n#2 \\\<installdir>\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(1096): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\Directory->createFile('IMG_20180307_07...', Resource id #94)\\n#3 \\\<installdir>\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/CorePlugin.php(525): Sabre\\\\DAV\\\\Server->createFile('1und1\\\/IMG_20180...', Resource id #94, NULL)\\n#4 [internal function]: Sabre\\\\DAV\\\\CorePlugin->httpPut(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#5 \\\<installdir>\\\/3rdparty\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#6 \\\<installdir>\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(479): Sabre\\\\Event\\\\EventEmitter->emit('method:PUT', Array)\\n#7 \\\<installdir>\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(254): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#8 \\\<installdir>\\\/apps\\\/dav\\\/appinfo\\\/v1\\\/webdav.php(80): Sabre\\\\DAV\\\\Server->exec()\\n#9 \\\<installdir>\\\/remote.php(164): require_once('\\\/var\\\/www\\\/virtua...')\\n#10 {main}\",\"File\":\"\\\<installdir>\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/File.php\",\"Line\":589}","userAgent":"Mozilla\/5.0 (Android) ownCloud-android\/3.0.3","version":"13.0.0.14"}
```
**NOTE:** Be super sure to remove sensitive data like passwords, note that everybody can look here! You can use the Issue Template application to prefill some of the required information: https://apps.nextcloud.com/apps/issuetemplate