This repository has been archived by the owner on Jan 18, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Public link single file share #278
Labels
enhancement
New feature or request
Comments
handlePropfind handler breakdown:
status:<code:CODE_OK trace:"c6ab889a57bfa2c69b0b9449ad87b78d" > info:<type:RESOURCE_TYPE_FILE id:<storage_id:"1284d238-aa92-42ce-bdc4-0b0000009162" opaque_id:"7138f0f9-cce7-4d7a-9480-735922a531ef" > etag:"\"98e60dd6abcb8acd60f5d84dd833f841\"" mime_type:"text/plain; charset=utf-8" mtime:<seconds:1592327644 > path:"/ItYJjJNdiuEn" permission_set:<create_container:true list_container:true > owner:<opaque_id:"einstein" > arbitrary_metadata:<metadata:<key:"http://owncloud.org/ns/favorite" value:"" > > >
info:
type:RESOURCE_TYPE_FILE id:<storage_id:"1284d238-aa92-42ce-bdc4-0b0000009162" opaque_id:"7138f0f9-cce7-4d7a-9480-735922a531ef" > etag:"\"98e60dd6abcb8acd60f5d84dd833f841\"" mime_type:"text/plain; charset=utf-8" mtime:<seconds:1592327644 > path:"/ItYJjJNdiuEn" permission_set:<create_container:true list_container:true > owner:<opaque_id:"einstein" > arbitrary_metadata:<metadata:<key:"http://owncloud.org/ns/favorite" value:"" > >
infos:
[type:RESOURCE_TYPE_FILE id:<storage_id:"1284d238-aa92-42ce-bdc4-0b0000009162" opaque_id:"7138f0f9-cce7-4d7a-9480-735922a531ef" > etag:"\"98e60dd6abcb8acd60f5d84dd833f841\"" mime_type:"text/plain; charset=utf-8" mtime:<seconds:1592327644 > path:"/ItYJjJNdiuEn" permission_set:<create_container:true list_container:true > owner:<opaque_id:"einstein" > arbitrary_metadata:<metadata:<key:"http://owncloud.org/ns/favorite" value:"" > > ]
<?xml version="1.0" encoding="utf-8"?>
<d:multistatus xmlns:d="DAV:"
xmlns:s="http://sabredav.org/ns"
xmlns:oc="http://owncloud.org/ns">
<d:response>
<d:href>/remote.php/dav/public-files/ItYJjJNdiuEn</d:href>
<d:propstat>
<d:prop>
<oc:permissions>WCKDNVR</oc:permissions>
<oc:favorite>0</oc:favorite>
<oc:fileid>MTI4NGQyMzgtYWE5Mi00MmNlLWJkYzQtMGIwMDAwMDA5MTYyOjcxMzhmMGY5LWNjZTctNGQ3YS05NDgwLTczNTkyMmE1MzFlZg==</oc:fileid>
<oc:owner-id>einstein</oc:owner-id>
<d:getcontentlength>0</d:getcontentlength>
<oc:size>0</oc:size>
<d:getlastmodified>Tue, 16 Jun 2020 17:14:04 +0000</d:getlastmodified>
<d:getetag>"98e60dd6abcb8acd60f5d84dd833f841"</d:getetag>
<d:resourcetype></d:resourcetype>
</d:prop>
<d:status>HTTP/1.1 200 OK</d:status>
</d:propstat>
<d:propstat>
<d:prop>
<oc:owner-display-name></oc:owner-display-name>
<oc:share-types></oc:share-types>
<oc:privatelink></oc:privatelink>
</d:prop>
<d:status>HTTP/1.1 404 Not Found</d:status>
</d:propstat>
</d:response>
</d:multistatus> Could the culprit be that The propfind request looks like: <?xml version="1.0"?>
<d:propfind xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns">
<d:prop>
<oc:permissions />
<oc:favorite />
<oc:fileid />
<oc:owner-id />
<oc:owner-display-name />
<oc:share-types />
<oc:privatelink />
<d:getcontentlength />
<oc:size />
<d:getlastmodified />
<d:getetag />
<d:resourcetype />
</d:prop>
</d:propfind> |
The culprit looks like:
|
for comparison, an oc10 response looks like: <?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>/remote.php/dav/public-files/ymdtTSZdX5NU5Vm/</d:href>
<d:propstat>
<d:prop>
<oc:permissions></oc:permissions>
<d:resourcetype>
<d:collection/>
</d:resourcetype>
</d:prop>
<d:status>HTTP/1.1 200 OK</d:status>
</d:propstat>
<d:propstat>
<d:prop>
<oc:favorite/>
<oc:fileid/>
<oc:owner-id/>
<oc:owner-display-name/>
<oc:share-types/>
<oc:privatelink/>
<d:getcontentlength/>
<oc:size/>
<d:getlastmodified/>
<d:getetag/>
</d:prop>
<d:status>HTTP/1.1 404 Not Found</d:status>
</d:propstat>
</d:response>
<d:response>
<d:href>/remote.php/dav/public-files/ymdtTSZdX5NU5Vm/WARNER%20BROTHERS%20PRESENTATION.pdf</d:href>
<d:propstat>
<d:prop>
<oc:permissions></oc:permissions>
<oc:fileid>167</oc:fileid>
<oc:owner-id>demo</oc:owner-id>
<oc:owner-display-name>demo</oc:owner-display-name>
<d:getcontentlength>94021780</d:getcontentlength>
<oc:size>94021780</oc:size>
<d:getlastmodified>Thu, 18 Jun 2020 12:20:20 GMT</d:getlastmodified>
<d:getetag>"a74ff5f5181645052f3cbcd94025151c"</d:getetag>
<d:resourcetype/>
</d:prop>
<d:status>HTTP/1.1 200 OK</d:status>
</d:propstat>
<d:propstat>
<d:prop>
<oc:favorite/>
<oc:share-types/>
<oc:privatelink/>
</d:prop>
<d:status>HTTP/1.1 404 Not Found</d:status>
</d:propstat>
</d:response>
</d:multistatus> |
After a few tweaks, was able to distinguish between files and containers (folders) and add a conditional to add a container to the <?xml version="1.0" encoding="utf-8"?>
<d:multistatus xmlns:d="DAV:"
xmlns:s="http://sabredav.org/ns"
xmlns:oc="http://owncloud.org/ns">
<d:response>
<d:href>/remote.php/dav/public-files/</d:href>
<d:propstat>
<d:prop>
<oc:favorite>0</oc:favorite>
<oc:size>0</oc:size>
<d:getlastmodified>Tue, 16 Jun 2020 17:14:04 +0000</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>
<oc:permissions></oc:permissions>
<oc:fileid></oc:fileid>
<oc:owner-id></oc:owner-id>
<oc:owner-display-name></oc:owner-display-name>
<oc:share-types></oc:share-types>
<oc:privatelink></oc:privatelink>
<d:getcontentlength></d:getcontentlength>
<d:getetag></d:getetag>
</d:prop>
<d:status>HTTP/1.1 404 Not Found</d:status>
</d:propstat>
</d:response>
<d:response>
<d:href>/remote.php/dav/public-files/ItYJjJNdiuEn</d:href>
<d:propstat>
<d:prop>
<oc:permissions>WCKDNVR</oc:permissions>
<oc:favorite>0</oc:favorite>
<oc:fileid>MTI4NGQyMzgtYWE5Mi00MmNlLWJkYzQtMGIwMDAwMDA5MTYyOjcxMzhmMGY5LWNjZTctNGQ3YS05NDgwLTczNTkyMmE1MzFlZg==</oc:fileid>
<oc:owner-id>einstein</oc:owner-id>
<d:getcontentlength>0</d:getcontentlength>
<oc:size>0</oc:size>
<d:getlastmodified>Tue, 16 Jun 2020 17:14:04 +0000</d:getlastmodified>
<d:getetag>"98e60dd6abcb8acd60f5d84dd833f841"</d:getetag>
<d:resourcetype></d:resourcetype>
</d:prop>
<d:status>HTTP/1.1 200 OK</d:status>
</d:propstat>
<d:propstat>
<d:prop>
<oc:owner-display-name></oc:owner-display-name>
<oc:share-types></oc:share-types>
<oc:privatelink></oc:privatelink>
</d:prop>
<d:status>HTTP/1.1 404 Not Found</d:status>
</d:propstat>
</d:response>
</d:multistatus> |
this has been implemented on cs3org/reva#822, see: cs3org/reva@575b62b |
This was referenced Jun 24, 2020
new PR here cs3org/reva#895 with a cleaner approach |
|
Merged
released in 1.0.0-beta6 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
We have cs3org/reva#822 but it doesn't implement single file
The text was updated successfully, but these errors were encountered: