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

AWS S3 Adapter: retrieve mime type from file content #1781

Open
miloslavkostir opened this issue Apr 12, 2024 · 1 comment
Open

AWS S3 Adapter: retrieve mime type from file content #1781

miloslavkostir opened this issue Apr 12, 2024 · 1 comment

Comments

@miloslavkostir
Copy link

Feature Request

Q A
Adapter Name AwsS3V3Adapter

Some services don't support Content-Type as a request parameter for PutObject e.g. Dell PowerScale OneFS see OneFS S3 API doc
Table 21. OneFS S3 PutObject API request parameters
On the other hand, some developers may prefer retrieving mime type from file content in the function AwsS3V3Adapter::mimeType() instead of getting it from HeadObject

What about creating (an optional) feature for retrieving content type from file content? Something like this:

$mimetype = $this->mimeTypeDetector->detectMimeTypeFromBuffer(fread($this->readStream($path), 1024));

Ideally I could the function enable/disable in the options.

@miloslavkostir
Copy link
Author

Like this miloslavkostir@2294371

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

No branches or pull requests

1 participant