yandex-cloud / geesefs

Finally, a good FUSE FS implementation over S3
Other
642 stars 42 forks source link

Content-Encoding in xattrs #97

Open max-arnold opened 8 months ago

max-arnold commented 8 months ago

Is it possible to get content-encoding (and content-type) via xattrs?

Right now in Yandex Cloud Functions mounted bucket I only see s3.etag and user.mtime (as retrieved by Python's os.listxattr)

max-arnold commented 8 months ago

The use case is to detect whether a file is compressed (gzip, brotli) and serve it via a Cloud Function using appropriate http headers

vitalif commented 8 months ago

Hi, it seems S3 ListObjects responses miss Content-Type for objects. ListObjects also missed UserMetadata. And GeeseFS tries to not perform HEAD requests for individual objects because it's really slow. Because of that, Yandex now has ListObjects list-type=ext-v1 which includes UserMetadata, but it seems it still misses ContentType :) so it should be implemented on the server first.

max-arnold commented 8 months ago

Am I correct that currently there is no way to access the Content-Type attribute even with an extra HEAD request through GeeseFS?

If yes, do you recommend to keep this issue open, or it is better to file a feature request against YC?

vitalif commented 8 months ago

With an extra HEAD request it's possible but I don't really want to implement it this way

max-arnold commented 8 months ago

Ok, submitted a feature request to YC. Let's keep this issue open for a while