Open cweiske opened 2 years ago
I'm not sure if we should fix this mime type issue here in this driver. Do you know the real source of this issue? Can we solve it in a more generic way (eg. for all mime types)?
The TYPO3 core also has a similar problem and introduced the MimeTypeDetector:
There is a manual list of mappings, too, that is used by FileInfo:
I don't know what the right solution is.
I've rebased against current master and fixed the code complexity by moving the code into a new method.
@Lagerregal: Shall I rewrite it to use the TYPO3 core mime type detector, or is the current list of css+js sufficient?
(Also, this only works for files that are not empty because the normal s3client uploader is used for empty files since #69, and I do not know how to pass the MIME type to that.
@cweiske thanks again for your contribution. I created another PR for that: #141 as i decided to use the TYPO3 mime-detector mappings for that issue.
As long as the issue gets finally solved I'm fine with that :)
Resolves: https://github.com/andersundsehr/aus_driver_amazon_s3/issues/85