İşte bir resmim var url. Dosya adı O S3 şeyler yüklemekResmi s3 kullanarak yükleyin boto
def upload(filename, content)
conn = S3Connection(aws_access_key, aws_secret_key)
b = Bucket(conn, bucket_name)
k = Key(b)
k.key = filename..split('/')[::-1][0]
k.set_metadata("Content-Type", 'images/jpeg')
k.set_contents_from_string(content)
k.set_acl("public-read")
görüntü url ama hata gösterir:
/tmp/t.jpeg
could not be opened, because the associated helper application does not exist. Change the association in your preferences.
Hata hangi satırı veriyor? Sorunun, yapıştırdığınız kodun parçası olmayabilir. –
Bu, Firefox/Windows'ta JPEG görüntüsünü açmaya çalışırken aldığınız bir hata mesajı gibi görünüyor. Her zaman Windows Photo Viewer ile JPEG görüntüleri açabilirsiniz. * .jpg ve * .jpeg dosyalarının Firefox veya Windows ile doğru şekilde ilişkilendirildiğini kontrol edin. – scoffey