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
How to keep or specify ContentType of object to upload? #632
Comments
thanks for opening an issue @neko-kawaii-nyan. This is not something Mountpoint supports currently, we will be investigating if this is something we can support in the future. We are updating this to be a feature request. |
Thank you for your reply. |
I have the same problem. |
Hello, just adding to the case as I get this same annoying "issue"... |
Perhaps extended attributes could somehow be leveraged to allow specifying content type (and perhaps other object metadata as well)? FUSE does support xattrs so it may be possible. When uploading, the user would probably have to call fsetxattr on a new filesystem node after the file is created and opened for writing, and before writing any data, so that the attributes are all accessible to Mountpoint before it makes the first call to upload the object so it can include the desired headers. It would be neat if the For extra credit, other object metadata you could do an automatic header translation into an extended attribute namespace. For example, |
Interesting ideas @sagebind but I wonder if that approach would add too much friction for different programming environments and runtimes vs normal file APIs and automatic detection. Maybe for advanced use cases. IIRC, the AWS CLI does automatic mime-type detection (based on file extension?) and that would seem to me to be best starting place for Mountpoint as well. |
Mountpoint for Amazon S3 version
mount-s3 1.2.0
AWS Region
ap-northeast-1
Describe the running environment
Running in EC2 on Amazon Linux 2 using instance profile credentials against an S3 Bucket in the another account.
What happened?
I use S3 as a CloudFront backend for website hosting purposes.
Therefore, the html file placed in S3 must be displayed as a web page when accessed by a browser, but if placed via mount-s3, the ContentType will be
binary/octet-stream
, so the html file will be downloaded.Is there any way to modify the ContentType of the object being uploaded to
text/html
?This is probably the same behavior as #471 .
Relevant log output
No response
The text was updated successfully, but these errors were encountered: