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 truncating existing files #4448

Merged
merged 12 commits into from Jan 11, 2024

Conversation

aduffeck
Copy link
Contributor

@aduffeck aduffeck commented Jan 8, 2024

This PR fixes the problem where existing files kept their content when being overwritten by a 0-byte file.

Fixes owncloud/ocis#8003

@aduffeck aduffeck requested review from a team and labkode as code owners January 8, 2024 09:02
Copy link

update-docs bot commented Jan 8, 2024

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.

The TUS handler will not finish the upload for us, that's usually
already done in the TUS POST request already, which we bypass by doing
the InitiateFileUpload flow.
@aduffeck aduffeck force-pushed the fix-truncating-existing-files branch from 843e74d to 717c1c6 Compare January 9, 2024 07:13
.drone.star Outdated
@@ -5,7 +5,7 @@ OSIXIA_OPEN_LDAP = "osixia/openldap:1.3.0"
REDIS = "redis:6-alpine"
OC_CI_PHP = "cs3org/behat:latest"
OC_LITMUS = "owncloud/litmus:latest"
OC_CS3_API_VALIDATOR = "owncloud/cs3api-validator:0.2.0"
OC_CS3_API_VALIDATOR = "owncloud/cs3api-validator:latest"
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't we stick to a release?

@@ -284,47 +286,6 @@ var _ = Describe("File uploads", func() {
})
})

When("the user uploads a zero byte file", func() {
Copy link
Contributor

Choose a reason for hiding this comment

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

should we add a negative test to document the clients should know they are not supposed to send a subsequent request after initiating a 0 byte file upload?

aduffeck and others added 2 commits January 10, 2024 17:17
Co-authored-by: Jörn Friedrich Dreyer <jfd@butonic.de>
@aduffeck aduffeck force-pushed the fix-truncating-existing-files branch 2 times, most recently from 928fef9 to 8b626a3 Compare January 10, 2024 18:23
@aduffeck aduffeck force-pushed the fix-truncating-existing-files branch from 8b626a3 to 51cb2d7 Compare January 11, 2024 07:03
@aduffeck aduffeck merged commit b74d280 into cs3org:edge Jan 11, 2024
9 checks passed
@aduffeck aduffeck deleted the fix-truncating-existing-files branch January 11, 2024 07:23
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.

None yet

2 participants