8000 http: add metadata support for the backend by hiddenmarten · Pull Request #8603 · rclone/rclone · GitHub
[go: up one dir, main page]

Skip to content

http: add metadata support for the backend #8603

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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

hiddenmarten
Copy link
Contributor
@hiddenmarten hiddenmarten commented Jun 15, 2025

What is the purpose of this change?

The objective is to extract the file name from the content-disposition header. This name should replace the one in stat, and a content-disposition handler should be provided via serve.

Was the change discussed in an issue or in the forum before?

#8298

Checklist

  • I have read the contribution guidelines.
  • 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.
  • I'm done, this Pull Request is ready for review :-)

P.S.:

Recreation of: #8413

@hiddenmarten
Copy link
Contributor Author
hiddenmarten commented Jun 20, 2025

@ncw It's ready for review.

Copy link
Member
@ncw ncw left a comment

Choose a reason for hiding this comment

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

Code looks great :-)

There are a few things missing for full metadata support

The metadata docs like this: https://rclone.org/s3/#metadata are auto generated by a Metadata info block

rclone/backend/s3/s3.go

Lines 222 to 225 in 3cae373

MetadataInfo: &fs.MetadataInfo{
System: systemMetadataInfo,
Help: `User metadata is stored as x-amz-meta- keys. S3 metadata keys are case insensitive and are always returned in lower case.`,
},

So the http backend needs one too.

I think you need to adjust the Feature flags also, eg

ReadMetadata: true,

And in turn the overview for the http backend (see metadata column)

https://github.com/rclone/rclone/blob/master/docs/content/overview.md

I think the http serve docs should probably mention that if --metadata is in use then these keys will be served as these headers etc...

Super job - thanks!

@hiddenmarten
Copy link
Contributor Author

Hi @ncw !

I've applied the suggested changes - thank you for the review.
It's ready again.

P.S. I don't think the failed windows build is related to my changes.

@hiddenmarten hiddenmarten requested a review from ncw June 20, 2025 20:05
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.

2 participants
0