andersundsehr / aus_driver_amazon_s3

Provides a TYPO3 FAL driver for the Amazon Web Service S3
GNU Lesser General Public License v3.0
20 stars 39 forks source link

[BUGFIX] Correctly set MIME type of .js and .css files #86

Open cweiske opened 2 years ago

cweiske commented 2 years ago

Resolves: https://github.com/andersundsehr/aus_driver_amazon_s3/issues/85

Lagerregal commented 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)?

cweiske commented 2 years ago

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.

cweiske commented 1 year ago

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.

weakbit commented 6 months ago

@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.

cweiske commented 6 months ago

As long as the issue gets finally solved I'm fine with that :)