No Etag after Last Chunk
The Tusd library has a hook called PreFinishResponseCallback, with that REVA could calculate the etag after the last chunk and write it to the response header, but this hook is never used....
How are the plans? Both the Desktop and soon Android Client already support that way, with a fallback using Propfind to force the etag from server. But that is a another Request, causing Latency.
in tusd library, vendor/config.go
and
handler/unrouted_handler.go
It would be a very nice stuff if this could be implemented?
https://github.com/opencloud-eu/android/pull/85
At bottom we already discussed why this isn't working out of the box.
I really appreciate your thoughts!
@kulmann @dragotin What do you think?
@zerox80 why is this a bug?
I changed type to Enhancement (as in Performance enhancement). It would save one round trip to get the ETag after the last chunk.
(@dragotin For nostalgia.. Note that we kind of already had this with the old chunking protocol. https://dragotin.wordpress.com/2015/06/22/owncloud-chunking-ng/ Or maybe not, that one had a MOVE and here it is just PATCHes.. :-) )
@zerox80 why is this a bug?
Not a real bug, i just didn't know if i should tag is as "feature request" "bug" or "enhancement".
Hi, is there any update?
I went ahead and prototyped this on the reva side, as a proposal to make the discussion concrete rather than a finished solution:
- https://github.com/opencloud-eu/reva/pull/666
It registers the PreFinishResponseCallback from the issue description so the chunked finalize returns the same etag and permissions as the creation-with-upload path. The PR carries one open design question: the data path is authenticated by the transfer token, which has no user identity, so the callback restores the upload's executant to stat the file; a small storage interface could surface the etag instead.
Edit (2026-06-30): the storage-interface version is now up as a separate PR, with the earlier one kept for comparison:
- https://github.com/opencloud-eu/reva/pull/718
🤖 drafted with Claude Code, reviewed before submitting.
EDIT: Ignore my comment, the mtime is just set to currentTime and resolveFinalEtagIfNeeded really only does ETag
with a fallback using Propfind to force the etag from server.
Just thinking aloud here @zerox80
I see this in Android code. it might not be ONLY about the ETag.
/**
* Update the database with latest details about this file.
*
* We will ask for thumbnails after the upload
* We will update info about the file (modification timestamp and etag)
*/
private fun updateFilesDatabaseWithLatestDetails() {
(I'm not into this topic, I just wanted to post this...)