-
Notifications
You must be signed in to change notification settings - Fork 3
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
fix: also add X-OC-Mtime
header to final chunks move
#1038
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1038 +/- ##
=======================================
Coverage 91.25% 91.25%
=======================================
Files 3 3
Lines 80 80
Branches 16 16
=======================================
Hits 73 73
Misses 4 4
Partials 3 3 ☔ View full report in Codecov by Sentry. |
@@ -242,6 +242,8 @@ export class Uploader { | |||
method: 'MOVE', | |||
url: `${tempUrl}/.file`, | |||
headers: { | |||
'X-OC-Mtime': file.lastModified / 1000, | |||
'OC-Total-Length': file.size, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this related? how did it work previously?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I saw that @artonge also added this. I figured that while X-OC-Mtime
was at stake here, maybe the same problem was also applying to the total lengh?
And bingo! It was, we also need it for the MOVE
https://github.com/nextcloud/server/blob/1719440079926ddd8fcbbc5bad76fda3fb21efad/apps/dav/lib/Upload/ChunkingPlugin.php#L58-L75
https://github.com/nextcloud/server/blob/1719440079926ddd8fcbbc5bad76fda3fb21efad/apps/dav/lib/Upload/ChunkingPlugin.php#L118-L119
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was just curious because it was not mentioned in the commit so not sure if related.
But makes sense :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(while it is not mentioned in the docs: https://docs.nextcloud.com/server/latest/developer_manual/client_apis/WebDAV/chunking.html#chunked-upload-v2 )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And bingo! It was, we also need it for the
MOVE
@skjnldsv that is the legacy chunking upload, so if we use v2 we do not need it 😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And bingo! It was, we also need it for the
MOVE
@skjnldsv that is the legacy chunking upload, so if we use v2 we do not need it 😉
Nope, the chunkingV2 is used for Object storage only :)
…nks move Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
Fix #1032