-
Notifications
You must be signed in to change notification settings - Fork 189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uploads with TUS should return the new fileid and etag #216
Comments
as discussed, for now OCIS will return the etag and the file id on the last PATCH request, the one where the last bit of the file is sent and before internally finishing the upload. since we currently don't support the concatenation extension, it's not relevant. |
@TheOneRing FYI |
ideally I'd only want to expose headers call "OC-Etag" and "OC-Fileid" on the OCDAV layer, as the prefix is highly dependent on OC. however, because TUS directs the client to send chunks directly to the storage provider, it means the headers must also be returned by the storage provider, which means every storage will need to implement returning those. I'll need to dig deeper to confirm this. |
I just had a quick try in the dataprovider.go and tried to call
not sure if there's a way to resolve it from there but it seems it would imply that the data provider needs access to the storage provider, it might be too deep in the layers |
I evaluated the upload scenarios with @PVince81. We currently see two that we need to support initially:
small file upload
huge file chunked upload
FAQQ: Can't we implment only one type of upload for now? |
for the record, we looked into returning metadata from the PATCH request but as this one is fully handled by the tusd Golang library, there is no mechanism there to allow us to access the response object before it is sent out, so we cannot return additional headers there. Possible approaches:
If we are to take the route of returning etag/fileid in the PATCH request, I'd be more in favor of the upstream patch... |
or: |
here's the beginning of my PR where I'm stuck due to the above issue: cs3org/reva#797 |
@PVince81 the ResponseWriter interface is not too big. we could wrap it, see cs3org/reva#797 (comment) |
we could tackle the X-OC-Mtime header as well: owncloud/ocis-reva#174 as wellm we need to return |
for creation-with-upload, here's a PR cs3org/reva#813 that will return the metadata if the upload completed within the POST request. |
seems there's already a feature request for custom headers here tus/tusd#388 but got denied for now |
oh, there's a |
we had a discussion to exclude the PATCH case as it's too complex to realize and also might not be that useful once we start thinking of async uploads, where a client will need to poll anyway |
owncloud/product#78 is closed |
The clients need them to update the metadata of the local file tree.
See https://github.com/cs3org/reva/pull/674/files/4d072d0601acc9e21d5e774f1f714cf5ac9fc6f0#r413153186
Related #214
The text was updated successfully, but these errors were encountered: