Skip to content
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 decomposedfs upload #2330

Merged
merged 1 commit into from
Dec 6, 2021
Merged

Conversation

butonic
Copy link
Contributor

@butonic butonic commented Dec 6, 2021

The FS.Upload() implementation needs to handle direct uploads that did not initiate a unpload.

fixes ocis spaces registry PR owncloud/ocis#2739

ocis makes direct PUT /data/spaces/spaceid!spaceid/relative/path/to/file.json requests to the metadata storage data provider. No initiate upload call ... we did that to save requests. Might be better to just use TUS with the creation-with-upload extension.

For now this allows us to create users with ocis and the accounts service.

Signed-off-by: Jörn Friedrich Dreyer <[email protected]>
@butonic butonic requested review from glpatcern, ishank011, labkode and a team as code owners December 6, 2021 20:38
@butonic butonic merged commit 7ac4043 into cs3org:edge Dec 6, 2021
@butonic butonic deleted the fix-decomposedfs-upload branch December 6, 2021 21:08
@wkloucek
Copy link
Contributor

wkloucek commented Dec 7, 2021

This is completely against the CS3api spec... It will create hidden complexity and produce bugs like owncloud/ocis#2609. That's why we removed zero-byte-uploads and the functionality you just added again in #2309.

Can we please revert this and solve it properly?

CC @C0rby

@butonic
Copy link
Contributor Author

butonic commented Dec 7, 2021

I agree the different upload mechanisms currently are confusing:

  • we have the InitiateFileUpload call which returns a "simple" or "tus" protocol endpoint
  • both protocols take an upload id, but
    • the eos driver uses a path as the upload token
    • the ocis metadata service bypasses all this as it used the "simple" protocol with a path

We should fix the metadata service to make the proper InitiateFileUpload + PUT request. While this will create more requests we can improve that later, similar to the creation-with-upload extension of TUS.

butonic added a commit that referenced this pull request Dec 7, 2021
butonic added a commit that referenced this pull request Dec 7, 2021
* Revert "fix decomposedfs upload (#2330)"

This reverts commit 7ac4043.

* add changelog
@kobergj kobergj mentioned this pull request Dec 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants