Extend InitiateFileUpload to support exclusive uploads and etags-based checks #122
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a revamp of #87, which got closed because the
master
branch got renamed tomain
...Pasting here the relevant parts:
This extension is motivated by cs3org/wopiserver#25. Discussing with @ishank011 it looks reasonable to extend the
InitiateFileUploadRequest
to support exclusive operations: I may want to upload a file "no matter what", overwriting the destination - which is the current behavior. Or I may want to atomically check-and-upload, which is the scope of this new flag. Both actions are legitimate and should be supported.The PR proposes a minimal extension of the protocol. May we need to support other POSIX(-like) flags and have rather an enum instead of just a bool? I guess by now we're settled, yet for reference the years-old
open()
call has plenty of options.Related to this, there's been quite some discussion around locking within ownCloud, that's why I'm involving @butonic too.
Comments/opinions welcome of course, but I'd like to move forward so to start testing the WOPI server locking logic with oCIS.