开发者

Client side s3 upload and returning the public url of the image

I am writing a client side image uploader library for python. I need to upload an image to Amazon S3 and return the public URL of the image. I can do this using BOTO however I have to share my Secret Key which is not the correct way of开发者_运维问答 doing it. As an alternative, I can use Browser upload using Amazon's POST request but that doesn't give me access to the image's public URL. How do I solve this conundrum?


I have the same issue. The only thing I have found is to make the image public on save and later use:

item.image.url.split('?')[0]

to get the URL.


How about using the urlparse module to get the URL without the query parameters?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜