Thanks to visit codestin.com
Credit goes to github.com

Skip to content

drime: add optional presigned uploads and cleanup support - #9886

Open
BAERnado wants to merge 4 commits into
rclone:masterfrom
BAERnado:master
Open

BAERnado wants to merge 4 commits into
rclone:masterfrom
BAERnado:master

Conversation

@BAERnado

@BAERnado BAERnado commented Sep 8, 2026

Copy link
Copy Markdown

What does this change do?

This adds optional single-part presigned uploads to the Drime backend. When use_presigned_uploads is enabled, files with a known size below 5 MiB and at or below upload_cutoff are uploaded through Drime's presigned S3 flow. Larger files continue to use the existing standard or multipart paths according to upload_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 bin as the required client extension.

This also implements the backend CleanUp feature using Drime's /file-entries/delete endpoint with emptyTrash enabled.

Unit tests cover the upload selection boundaries, the complete presigned request/upload/entry flow, extensionless filenames, and emptying the trash.

Validation performed:

  • go build
  • go test ./backend/drime
  • make quicktest
  • Live uploads to Drime were tested both directly and through a crypt remote with files from 0.5 MiB to 10 MiB, covering presigned, standard, and multipart upload paths; downloaded content matched the source data
  • Live cleanup was tested against Drime

Linked 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_all run was not performed.

Checklist

  • This change is trivial OR it has been discussed and agreed in the linked issue.
  • I have read the contribution guidelines.
  • (If I used AI tools to help write this code) I have read and understood the AI-assisted contributions guidance, and I have tested and take ownership of this change myself.
  • I have added tests for all changes in this PR if appropriate.
  • I have added documentation for the changes if appropriate.
  • All commit messages are in house style.
  • (Backend changes only) test_all passes for this backend and if submitting a new backend can provide a test account for the integration tester - see CONTRIBUTING.md.
  • This Pull Request is ready for review.

@BAERnado
BAERnado requested a review from ncw as a code owner September 8, 2026 11:16
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.

drime: support for single-part presigned uploads

1 participant