I am running into the exact same issue here.
To track the issue down I created the following folder structure:
testingfolder (directory)
|- testingfile.txt (empty file)
|- testingfolder2 (directory)
|- testingfile2.txt (empty file)
After that, I sniffed the communication between the iOS client/Readdle Documents.
When syncing testingfolder:
OPTIONS /owncloud/remote.php/webdav HTTP/1.1
Host: owncloud.prdom
Accept-Encoding: gzip, deflate
Content-Length: 0
Connection: keep-alive
Accept: */*
User-Agent: ReaddleDAV Documents/6.2.7.416 (redirects)
Authorization: Basic hello=
Accept-Language: de-de
X-Device-Name: pr's iPhone8
HTTP/1.1 200 OK
Date: Mon, 01 Jan 2018 12:19:10 GMT
Server: Apache/2.4.25 (Debian)
Set-Cookie: oc63oltz1bjb=0u89dviamn7cfvi454id4bgim6; path=/owncloud; HttpOnly
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Set-Cookie: oc_sessionPassphrase=hello; path=/owncloud; httponly
Content-Security-Policy: default-src 'none';
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Robots-Tag: none
X-Download-Options: noopen
X-Permitted-Cross-Domain-Policies: none
Set-Cookie: hello; path=/owncloud; HttpOnly
Set-Cookie: cookie_test=test; expires=Mon, 01-Jan-2018 13:19:10 GMT; Max-Age=3600
Allow: OPTIONS, GET, HEAD, DELETE, PROPFIND, PUT, PROPPATCH, COPY, MOVE, REPORT
DAV: 1, 3, extended-mkcol
MS-Author-Via: DAV
Accept-Ranges: bytes
Content-Length: 0
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=UTF-8
PROPFIND /owncloud/remote.php/webdav/ HTTP/1.1
Host: owncloud.prdom
Accept: */*
Authorization: Basic hello=
X-Device-Name: pr's iPhone8
Accept-Language: de-de
Accept-Encoding: gzip, deflate
Content-Type: application/xml
Content-Length: 212
Depth: 1
Connection: keep-alive
User-Agent: ReaddleDAV Documents/6.2.7.416 (redirects)
Cookie: cookie_test=test; hello; oc_sessionPassphrase=hello
<?xml version="1.0" encoding="utf-8"?> <propfind xmlns="DAV:"><prop><getcontentlength xmlns="DAV:"/> <getlastmodified xmlns="DAV:"/><creationdate xmlns="DAV:"/><resourcetype xmlns="DAV:"/></prop></propfind>HTTP/1.1 207 Multi-Status
Date: Mon, 01 Jan 2018 12:19:10 GMT
Server: Apache/2.4.25 (Debian)
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-Security-Policy: default-src 'none';
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Robots-Tag: none
X-Download-Options: noopen
X-Permitted-Cross-Domain-Policies: none
Vary: Brief,Prefer
DAV: 1, 3, extended-mkcol
Content-Length: 3685
Keep-Alive: timeout=5, max=99
Connection: Keep-Alive
Content-Type: application/xml; charset=utf-8
<?xml version="1.0"?>
<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:oc="http://owncloud.org/ns"><d:response><d:href>/owncloud/remote.php/webdav/</d:href><d:propstat><d:prop><d:getlastmodified>Mon, 01 Jan 2018 12:17:01 GMT</d:getlastmodified><d:resourcetype><d:collection/></d:resourcetype></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><d:getcontentlength/><d:creationdate/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response><d:response><d:href>/owncloud/remote.php/webdav/Actions/</d:href><d:propstat><d:prop><d:getlastmodified>Sun, 31 Dec 2017 07:05:05 GMT</d:getlastmodified><d:resourcetype><d:collection/></d:resourcetype></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><d:getcontentlength/><d:creationdate/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response><d:response><d:href>/owncloud/remote.php/webdav/Documents/</d:href><d:propstat><d:prop><d:getlastmodified>Mon, 25 Dec 2017 13:16:11 GMT</d:getlastmodified><d:resourcetype><d:collection/></d:resourcetype></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><d:getcontentlength/><d:creationdate/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response><d:response><d:href>/owncloud/remote.php/webdav/Media/</d:href><d:propstat><d:prop><d:getlastmodified>Mon, 01 Jan 2018 03:58:48 GMT</d:getlastmodified><d:resourcetype><d:collection/></d:resourcetype></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><d:getcontentlength/><d:creationdate/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response><d:response><d:href>/owncloud/remote.php/webdav/Notes/</d:href><d:propstat><d:prop><d:getlastmodified>Fri, 01 Jul 2016 19:34:08 GMT</d:getlastmodified><d:resourcetype><d:collection/></d:resourcetype></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><d:getcontentlength/><d:creationdate/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response><d:response><d:href>/owncloud/remote.php/webdav/Photos/</d:href><d:propstat><d:prop><d:getlastmodified>Mon, 01 Jan 2018 03:20:23 GMT</d:getlastmodified><d:resourcetype><d:collection/></d:resourcetype></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><d:getcontentlength/><d:creationdate/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response><d:response><d:href>/owncloud/remote.php/webdav/Profiles/</d:href><d:propstat><d:prop><d:getlastmodified>Mon, 13 Nov 2017 07:48:06 GMT</d:getlastmodified><d:resourcetype><d:collection/></d:resourcetype></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><d:getcontentlength/><d:creationdate/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response><d:response><d:href>/owncloud/remote.php/webdav/Reader/</d:href><d:propstat><d:prop><d:getlastmodified>Thu, 28 Dec 2017 16:44:08 GMT</d:getlastmodified><d:resourcetype><d:collection/></d:resourcetype></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><d:getcontentlength/><d:creationdate/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response><d:response><d:href>/owncloud/remote.php/webdav/testingfolder/</d:href><d:propstat><d:prop><d:getlastmodified>Mon, 01 Jan 2018 12:17:01 GMT</d:getlastmodified><d:resourcetype><d:collection/></d:resourcetype></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><d:getcontentlength/><d:creationdate/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response></d:multistatus>PROPFIND /owncloud/remote.php/webdav/testingfolder/ HTTP/1.1
Host: owncloud.prdom
Accept: */*
Authorization: Basic hello=
X-Device-Name: pr's iPhone8
Accept-Language: de-de
Accept-Encoding: gzip, deflate
Content-Type: application/xml
Content-Length: 212
Depth: infinity
Connection: keep-alive
User-Agent: ReaddleDAV Documents/6.2.7.416 (redirects)
Cookie: cookie_test=test; hello; oc_sessionPassphrase=hello
<?xml version="1.0" encoding="utf-8"?> <propfind xmlns="DAV:"><prop><getcontentlength xmlns="DAV:"/> <getlastmodified xmlns="DAV:"/><creationdate xmlns="DAV:"/><resourcetype xmlns="DAV:"/></prop></propfind>HTTP/1.1 207 Multi-Status
Date: Mon, 01 Jan 2018 12:19:10 GMT
Server: Apache/2.4.25 (Debian)
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-Security-Policy: default-src 'none';
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Robots-Tag: none
X-Download-Options: noopen
X-Permitted-Cross-Domain-Policies: none
Vary: Brief,Prefer
DAV: 1, 3, extended-mkcol
Content-Length: 1811
Keep-Alive: timeout=5, max=98
Connection: Keep-Alive
Content-Type: application/xml; charset=utf-8
<?xml version="1.0"?>
<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:oc="http://owncloud.org/ns"><d:response><d:href>/owncloud/remote.php/webdav/testingfolder/</d:href><d:propstat><d:prop><d:getlastmodified>Mon, 01 Jan 2018 12:17:01 GMT</d:getlastmodified><d:resourcetype><d:collection/></d:resourcetype></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><d:getcontentlength/><d:creationdate/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response><d:response><d:href>/owncloud/remote.php/webdav/testingfolder/testingfile.txt</d:href><d:propstat><d:prop><d:getcontentlength>0</d:getcontentlength><d:getlastmodified>Mon, 01 Jan 2018 12:16:43 GMT</d:getlastmodified><d:resourcetype/></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><d:creationdate/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response><d:response><d:href>/owncloud/remote.php/webdav/testingfolder/testingfolder2/</d:href><d:propstat><d:prop><d:getlastmodified>Mon, 01 Jan 2018 12:17:01 GMT</d:getlastmodified><d:resourcetype><d:collection/></d:resourcetype></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><d:getcontentlength/><d:creationdate/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response><d:response><d:href>/owncloud/remote.php/webdav/testingfolder/testingfolder2/testingfile2.txt</d:href><d:propstat><d:prop><d:getcontentlength>0</d:getcontentlength><d:getlastmodified>Mon, 01 Jan 2018 12:17:01 GMT</d:getlastmodified><d:resourcetype><d:collection/></d:resourcetype></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><d:creationdate/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response></d:multistatus>
The interesting part should be:
<d:response>
<d:href>/owncloud/remote.php/webdav/testingfolder/testingfolder2/testingfile2.txt</d:href>
<d:propstat>
<d:prop>
<d:getcontentlength>0</d:getcontentlength>
<d:getlastmodified>Mon, 01 Jan 2018 12:17:01 GMT</d:getlastmodified>
<d:resourcetype>
<d:collection />
</d:resourcetype>
</d:prop>
<d:status>HTTP/1.1 200 OK</d:status>
</d:propstat>
[...]
</d:response>
From my understanding - it’s really hard to find the right spot in the rfc without extensive time - d:resourcetype should be empty for regular files.
When only browsing the folder structure in Documents without syncing all file types are displayed correctly:
PROPFIND /owncloud/remote.php/webdav/testingfolder/ HTTP/1.1
Host: owncloud.prdom
Accept: */*
Authorization: Basic hello=
X-Device-Name: pr's iPhone8
Accept-Language: de-de
Accept-Encoding: gzip, deflate
Content-Type: application/xml
Content-Length: 212
Depth: 1
Connection: keep-alive
User-Agent: ReaddleDAV Documents/6.2.7.416 (redirects)
Cookie: cookie_test=test; hello; oc_sessionPassphrase=hello
<?xml version="1.0" encoding="utf-8"?> <propfind xmlns="DAV:"><prop><getcontentlength xmlns="DAV:"/> <getlastmodified xmlns="DAV:"/><creationdate xmlns="DAV:"/><resourcetype xmlns="DAV:"/></prop></propfind>HTTP/1.1 207 Multi-Status
Date: Mon, 01 Jan 2018 12:33:21 GMT
Server: Apache/2.4.25 (Debian)
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-Security-Policy: default-src 'none';
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Robots-Tag: none
X-Download-Options: noopen
X-Permitted-Cross-Domain-Policies: none
Vary: Brief,Prefer
DAV: 1, 3, extended-mkcol
Content-Length: 1358
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: application/xml; charset=utf-8
<?xml version="1.0"?>
<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:oc="http://owncloud.org/ns"><d:response><d:href>/owncloud/remote.php/webdav/testingfolder/</d:href><d:propstat><d:prop><d:getlastmodified>Mon, 01 Jan 2018 12:17:01 GMT</d:getlastmodified><d:resourcetype><d:collection/></d:resourcetype></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><d:getcontentlength/><d:creationdate/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response><d:response><d:href>/owncloud/remote.php/webdav/testingfolder/testingfile.txt</d:href><d:propstat><d:prop><d:getcontentlength>0</d:getcontentlength><d:getlastmodified>Mon, 01 Jan 2018 12:16:43 GMT</d:getlastmodified><d:resourcetype/></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><d:creationdate/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response><d:response><d:href>/owncloud/remote.php/webdav/testingfolder/testingfolder2/</d:href><d:propstat><d:prop><d:getlastmodified>Mon, 01 Jan 2018 12:17:01 GMT</d:getlastmodified><d:resourcetype><d:collection/></d:resourcetype></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><d:getcontentlength/><d:creationdate/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response></d:multistatus>PROPFIND /owncloud/remote.php/webdav/testingfolder/testingfolder2/ HTTP/1.1
Host: owncloud.prdom
Accept: */*
Authorization: Basic hello=
X-Device-Name: pr's iPhone8
Accept-Language: de-de
Accept-Encoding: gzip, deflate
Content-Type: application/xml
Content-Length: 212
Depth: 1
Connection: keep-alive
User-Agent: ReaddleDAV Documents/6.2.7.416 (redirects)
Cookie: cookie_test=test; hello; oc_sessionPassphrase=hello
<?xml version="1.0" encoding="utf-8"?> <propfind xmlns="DAV:"><prop><getcontentlength xmlns="DAV:"/> <getlastmodified xmlns="DAV:"/><creationdate xmlns="DAV:"/><resourcetype xmlns="DAV:"/></prop></propfind>HTTP/1.1 207 Multi-Status
Date: Mon, 01 Jan 2018 12:33:22 GMT
Server: Apache/2.4.25 (Debian)
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-Security-Policy: default-src 'none';
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Robots-Tag: none
X-Download-Options: noopen
X-Permitted-Cross-Domain-Policies: none
Vary: Brief,Prefer
DAV: 1, 3, extended-mkcol
Content-Length: 973
Keep-Alive: timeout=5, max=99
Connection: Keep-Alive
Content-Type: application/xml; charset=utf-8
<?xml version="1.0"?>
<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:oc="http://owncloud.org/ns"><d:response><d:href>/owncloud/remote.php/webdav/testingfolder/testingfolder2/</d:href><d:propstat><d:prop><d:getlastmodified>Mon, 01 Jan 2018 12:17:01 GMT</d:getlastmodified><d:resourcetype><d:collection/></d:resourcetype></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><d:getcontentlength/><d:creationdate/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response><d:response><d:href>/owncloud/remote.php/webdav/testingfolder/testingfolder2/testingfile2.txt</d:href><d:propstat><d:prop><d:getcontentlength>0</d:getcontentlength><d:getlastmodified>Mon, 01 Jan 2018 12:16:52 GMT</d:getlastmodified><d:resourcetype/></d:prop><d:status>HTTP/1.1 200 OK</d:status></d:propstat><d:propstat><d:prop><d:creationdate/></d:prop><d:status>HTTP/1.1 404 Not Found</d:status></d:propstat></d:response></d:multistatus>
Relevant part:
<d:response>
<d:href>/owncloud/remote.php/webdav/testingfolder/testingfolder2/testingfile2.txt</d:href>
<d:propstat>
<d:prop>
<d:getcontentlength>0</d:getcontentlength>
<d:getlastmodified>Mon, 01 Jan 2018 12:16:52 GMT</d:getlastmodified>
<d:resourcetype />
</d:prop>
<d:status>HTTP/1.1 200 OK</d:status>
</d:propstat>
[...]
</d:response>
I hope, this helps to track down the problem.
Patrick