We are using using GCS Fuse to manage content on some GCS buckets, but an issue we're running into is that files written by gcsfuse always seem to have the content-type of 'application/octet-stream' once in GCS. I'm not seeing anything in the gcsfuse docs to indicate a way to force appropriate headers for content. I do see a function "DetectMediaType" that defaults to application/octet-stream, but no indication as to why it isn't getting ContentType correct.
Asked
Active
Viewed 229 times
1 Answers
3
DetectMediaType is actually a function in the Google API Client portion of GCS fuse and isn't being used to detect the content type of the local file being uploaded. I did a quick grep of the source and can see that 'application/octet-stream' is used as the default Content-Type when none is specified, and there doesn't appear to be any code which does MIME type detection of local files.
It looks like this is simply not implemented, so the next destination would be the project GitHub page, though I imagine you would be directed to submit a pull request since this would essentially be an ask for a feature.
![](../../users/profiles/286003.webp)
Adam
- 798
- 3
- 11