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

Support for custom object metadata #2013

Closed
damooo opened this issue Apr 16, 2023 · 7 comments
Closed

Support for custom object metadata #2013

damooo opened this issue Apr 16, 2023 · 7 comments
Labels
core good first issue Good for newcomers help wanted Extra attention is needed

Comments

@damooo
Copy link
Contributor

damooo commented Apr 16, 2023

Many cloud backends supports attaching custom metadata as key-value pairs to an object. That is a great way to attach some metadata to an object in concurrency-safe transactional way without much fuss at application layer. It would be great if opendal propagates that support.

See also:

These all services have different custom header coonventions for custom kv metadata. We can normalize at opendal args layer, and propagate as per convention.

@damooo
Copy link
Contributor Author

damooo commented Apr 17, 2023

Most modern filesystems like ext2, ext3, ext4, NTFS, zfs, etc support extended file attributes. Rust has popular xattr to handle them in os/fs agnostic way.

@damooo
Copy link
Contributor Author

damooo commented Apr 17, 2023

@Xuanwo
Copy link
Member

Xuanwo commented Apr 17, 2023

Great idea! This is exactly what I would like to incorporate into OpenDAL.

@jokester
Copy link
Contributor

jokester commented Oct 8, 2023

I'm not sure this can be possible for all services, but even partial support would help much.

An important use of S3 or GCS is to host static files for web, it just feels incomplete when we can't set a contentType for a new file.

@Xuanwo
Copy link
Member

Xuanwo commented Oct 8, 2023

it just feels incomplete when we can't set a contentType for a new file.

This feature has already been supported. You can use the following code to set content type for a file:

let bs = b"hello, world!".to_vec();
let _ = op
    .write_with("path/to/file", bs)
    .content_type("text/plain")
    .await?;

And this issue is mainly about custom object metadata, for example, x-amz-meta-abc for s3.

@jokester
Copy link
Contributor

jokester commented Oct 8, 2023

This feature has already been supported

Thanks & sorry I didn't know that. I only checked python bindings.

I will look deeper first, starting from whether that's available in python 👍🏽

@Xuanwo Xuanwo added the help wanted Extra attention is needed label Dec 19, 2023
@Xuanwo Xuanwo added the good first issue Good for newcomers label Jun 18, 2024
@Xuanwo Xuanwo mentioned this issue Jul 1, 2024
3 tasks
@Xuanwo
Copy link
Member

Xuanwo commented Jul 1, 2024

Tracked at #4842, closing this feature request now.

@Xuanwo Xuanwo closed this as completed Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants