Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What does this change do?
This adds optional single-part presigned uploads to the Drime backend. When
use_presigned_uploadsis enabled, files with a known size below 5 MiB and at or belowupload_cutoffare uploaded through Drime's presigned S3 flow. Larger files continue to use the existing standard or multipart paths according toupload_cutoff, and files with an unknown size continue to use multipart uploads.The implementation requests a presigned URL, uploads the content without forwarding the Drime authorization header, and creates the Drime file entry afterwards. Extensionless names, including names produced by a crypt remote, use
binas the required client extension.This also implements the backend
CleanUpfeature using Drime's/file-entries/deleteendpoint withemptyTrashenabled.Unit tests cover the upload selection boundaries, the complete presigned request/upload/entry flow, extensionless filenames, and emptying the trash.
Validation performed:
go buildgo test ./backend/drimemake quicktestLinked issue
Fixes #9750
For new or changed backends
This changes an existing backend. The focused tests and live backend checks described above pass. A full
test_allrun was not performed.Checklist
test_allpasses for this backend and if submitting a new backend can provide a test account for the integration tester - see CONTRIBUTING.md.