Uh oh!
There was an error while loading. Please reload this page.
Return hashes of uploaded content for dav uploads - #19351
Conversation
tobiasKaminsky
commented
Feb 10, 2020
Nice :-)
|
icewind1991
commented
Feb 13, 2020
This only returns the hash of the uploaded content so clients can detect corrupted transfers |
rullzer
commented
Feb 13, 2020
To give a bit more context ;)
No but you can detect it at least client side. And do something.
Adding this is tricky. Just imagine on a big instance and everybody starts to request the hash of several GB files. This could easily kill the server. Long story short. This is a step in the right direction but not the full fix at all. |
tobiasKaminsky
commented
Feb 13, 2020
So I would upload the file, then download info of it, compare hash. That sounds a bit too complicated… Can't we adjust it so that server will compare hash and if it is not the same refuses the file to be moved and returns an error.
True. So we can reliable use this for all files, once each upload and change on server computes a hash sum? |
icewind1991
commented
Feb 13, 2020
Keeping hashes for files stored on the server is a much more complex problem then just returning a hash from uploaded content. |
rullzer
commented
Feb 13, 2020
That is a next step. But a lot more complicated and not covered in this PR. |
tobiasKaminsky
commented
Feb 14, 2020
Totally understandable.
Then I will wait until the next step, as we otherwise would implement the error handling logic on client side and then later can remove it again. |
rullzer
commented
Apr 4, 2020
@icewind1991 mind to fix ci so we can get this in as well? |
71ccecf to
f9999c6Comparekesselb
commented
Apr 12, 2020
@tobiasKaminsky the calculated hash is part of the response of the move or put operation. No need to download the file info. |
hashes are set in "X-Hash-MD5", "X-Hash-SHA1" and "X-Hash-SHA256" headers. these headers are set for file uploads and the MOVE request at the end of a multipart upload. Signed-off-by: Robin Appelman <robin@icewind.nl>
Signed-off-by: Robin Appelman <robin@icewind.nl>
tobiasKaminsky
commented
Apr 15, 2020
True, but still this needs to be done on client side. |
tobiasKaminsky
commented
Apr 21, 2020
I only see it as a response header in put operation, but not in final move (of chunked upload)? |
tobiasKaminsky
commented
Apr 21, 2020
Nevermind. I did something wrong, but now it works… |
5 similar comments
tobiasKaminsky
commented
Apr 21, 2020
Nevermind. I did something wrong, but now it works… |
tobiasKaminsky
commented
Apr 21, 2020
Nevermind. I did something wrong, but now it works… |
tobiasKaminsky
commented
Apr 21, 2020
Nevermind. I did something wrong, but now it works… |
tobiasKaminsky
commented
Apr 21, 2020
Nevermind. I did something wrong, but now it works… |
tobiasKaminsky
commented
Apr 21, 2020
Nevermind. I did something wrong, but now it works… |
hashes are set in "X-Hash-MD5", "X-Hash-SHA1" and "X-Hash-SHA256" headers.
these headers are set for file uploads and the MOVE request at the end of a multipart upload.
cc @tobiasKaminsky