'uploading svg as stream using boto3
I'm trying to upload a photo to digital ocean. I'm able to upload jpg and mp4 but for some reason, SVG is not working.
try:
imgUrl = getImgUrl(tokenId, imgType)
with requests.get(imgUrl, stream=True) as r:
conf = boto3.s3.transfer.TransferConfig(multipart_threshold=10000, max_concurrency=4)
client.upload_fileobj(Fileobj=r.raw, Bucket=tokenId, Key=imgType, ExtraArgs={
'ContentType': r.headers['Content-Type'], "ACL": "public-read"}, Config=conf)
except Exception as e:
raise Exception(str(e))
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
