Closed cslzchen closed 5 years ago
This has been merged as a hotfix into master, but GH didn't pick up on that when I retargeted the PR to master. I tried switching to develop and back to master, but it won't let me since the commits are already in master. Confusing. Anyway, this has been merged!
Gonna try re-opening and reclosing to trigger a travis build.
Nope! That didn't work at all!
Ticket
https://openscience.atlassian.net/browse/ENG-748
Purpose
Main
Chunked upload fails to upload the file to the intended folder. Instead, the file ends up in the root folder. During chunked upload session creation, the wrong folder was provided as the parent in the data payload. It should be
path.parent.identifier
instead of theself.folder
. Here is the correct one with contiguous upload and here is the wrong one with chunked upload.By-product
Correctly handle the mutually exclusiveness between file ID and parent folder ID during chunked upload session creation. During the creation, WB should EITHER provide the
path.identifier
(file ID) in the URL if the file already exists OR provide thepath.parent.identifier
(parent folder ID) in the data payload. In addition, providing both will get a 400 with errormultiple_destinations
. Moreover, providing the parent folder ID when the file exists will get a 409 with erroritem_name_in_use
. Finally, chunked upload never asks user to confirm file conflicts and just overwrites.Out-of-scope
Changes
Main
Use
path.parent.identifier
instead of theself.folder
.By-product
Only add
folder_id
to payload data whenpath.identifier
isNone
.Side effects
No
QA Notes
Please refer to the QA Notes section in the ticket.
Deployment Notes
No