Open GoogleCodeExporter opened 8 years ago
Hi David (and anyone else who has this problem),
I am by no means a Java developer but this is the solution I found to this
problem.
awstasks uses javax.activation.MimetypesFileTypeMap to work out mime types and
from a quick search it seems to be limited in what mime types it recognises -
which is why CSS and JS files are set as octect-stream.
The latest version of awstats in SVN (NOT v0.3 which is what you get from the
download link on the homepage) includes a "mimeTypesFile" attribute where you
can pass in a file location with a list of mime types. So checkout the latest
version from SVN and run 'ant jar' to build the latest JAR.
So your S3Upload task my look at little like:
<S3Upload verbose="true"
accessId="${aws.accessId}"
secretKey="${aws.secretKey}"
bucket="${aws.bucket}"
publicRead="true"
mimeTypesFile="deploy.mime.types">
then in your deploy.mime.types file:
text/css css
application/x-javascript js
and any other mime types that are being incorrectly set (the format is <MIME
TYPE> <SPACE DELIMITED LIST OF FILE EXTENSIONS>).
Hope that helps,
Ed
Original comment by e...@assertivelabs.com
on 22 Jan 2012 at 3:00
Original issue reported on code.google.com by
de...@yahoo.com
on 28 Jun 2011 at 9:42