Please set mime-type to text/plain *.TXT files under https://archive.mozilla.org/pub/seamonkey/
Categories
(Cloud Services :: Operations: Product Delivery, task)
Tracking
(Not tracked)
People
(Reporter: ewong, Assigned: oremj)
References
Details
Currently, https://archive.mozilla.org/pub/seamonkey/releases/2.53.1/README.txt (or
any other txt files are served as binary/octet-stream. Please change the TXT files served as text/plain.
Thanks
| Assignee | ||
Updated•6 years ago
|
| Assignee | ||
Comment 1•6 years ago
|
||
I've fixed existing objects with the following script:
import boto3
s3 = boto3.resource('s3')
bucket = s3.Bucket('net-mozaws-prod-delivery-archive')
objs = bucket.objects.filter(Prefix='pub/seamonkey/')
for o in objs:
if not o.key.endswith('README'):
continue
o.Object().copy_from(
CopySource={
'Bucket': 'net-mozaws-prod-delivery-archive',
'Key': o.key
},
ContentType='text/plain',
MetadataDirective="REPLACE",
)
print(f"Changing content type for {o.key}")
If you want new objects to have the content type set correctly, it needs to be specified at upload time. It looks like new files are like the one in the description are already good.
| Reporter | ||
Comment 2•6 years ago
|
||
(In reply to Jeremy Orem [:oremj] from comment #1)
If you want new objects to have the content type set correctly, it needs to be specified at upload time. It looks like new files are like the one in the description are already good.
Thanks Jeremy! I kinda new it had to be a screwup on my part. My apologies for the trouble. I'll fix the upload scripts now.
Description
•