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: chunked upload of existing file creates new version #1899

Merged
merged 1 commit into from
Jul 21, 2021

Conversation

C0rby
Copy link
Contributor

@C0rby C0rby commented Jul 19, 2021

Chunked uploads didn't create a new version, when the file to upload already existed.

@update-docs
Copy link

update-docs bot commented Jul 19, 2021

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@lgtm-com
Copy link

lgtm-com bot commented Jul 19, 2021

This pull request introduces 13 alerts when merging 0cc96aa into 7df477f - view on LGTM.com

new alerts:

  • 13 for Uncontrolled data used in path expression

@lgtm-com
Copy link

lgtm-com bot commented Jul 19, 2021

This pull request introduces 13 alerts when merging 36f3efa into 7df477f - view on LGTM.com

new alerts:

  • 13 for Uncontrolled data used in path expression

@C0rby C0rby self-assigned this Jul 19, 2021
@C0rby C0rby marked this pull request as ready for review July 19, 2021 13:40
@@ -360,6 +358,33 @@ func (fs *Decomposedfs) GetUpload(ctx context.Context, id string) (tusd.Upload,
}, nil
}

// lookupNode looks up nodes by path.
// This method can also handle lookups for paths which contain chunking information.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you add a reason how this function differs from the one in the lookup interface? Do you think other implementations of the decomposedfs need the same handling / detection of chunked paths? should fs.lu.NodeFromPath maybe get a parameter to handle chunked paths? why not add a fs.lu.NodeFromChunkedPath and refactor the two functions to share more code?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, now I see that you are calling fs.lu.NodeFromPath in lookupNode ... nevermind my comment ;-)

@labkode labkode merged commit 57d692f into cs3org:master Jul 21, 2021
@C0rby C0rby deleted the chunked-upload-versions branch July 21, 2021 08:04
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