üzerinde bulunan dosyalarda content_type öğesini ayarlayın s3boto arka ucuna sahip django depoları kullanıyorum. Bu konuya göre, http://code.larlet.fr/django-storages/issue/5/s3botostorage-set-content-type-header-acl-fixed-use-http-and-disable-query-auth-by 'Uygulama/okt-akış' içerik türüne sahip bir sürü dosyam var (hepsi). <class 'boto.s3.key.Key'>
örneğim olduğu için, içerik_türü nasıl ayarlayabilirim?Boto kullanarak, s3
In [29]: a.file.file.key.content_type
Out[29]: 'application/octet-stream'
In [30]: mimetypes.guess_type(a.file.file.key.name)[0]
Out[30]: 'image/jpeg'
In [31]: type(a.file.file.key)
Out[31]: <class 'boto.s3.key.Key'>