私はファイルをアップロードしようとすると、私は、私はこのエラーを取得し、Pythonの3のジャンゴ・ストレージののbotoストレージを通じてS3のファイルストレージを使用しています:ジャンゴストレージ]後のBotoバート・ダイジェスト
boto.exception.S3ResponseError: S3ResponseError: 400 Bad Request
<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>BadDigest</Code>
<Message>The Content-MD5 you specified did not match what we received.</Message>
...
私がしようとしていますファイル保存するには、ファイルが要求と共にダウンロードされている。その要点は:
import requests
from django.core.files.base import ContentFile
response = requests.get("http://example.com/some_file.pdf")
document_contents = ContentFile(response.text)
my_model.save("filename", document_contents)
私は間違っていますか?