import_uploads_s3: Fix setting of content-type.

This commit is contained in:
Tim Abbott
2016-08-13 11:26:53 -07:00
parent 8edc5110cd
commit 4a46b879ee

View File

@@ -1248,7 +1248,7 @@ def import_uploads_s3(bucket_name, import_dir, processing_avatars=False):
key.set_metadata("realm_id", str(user_profile.realm.id))
key.set_metadata("orig_last_modified", record['last_modified'])
headers = {'Content-Type': key['content_type']}
headers = {'Content-Type': record['content_type']}
key.set_contents_from_filename(os.path.join(import_dir, record['path']), headers=headers)