开发者

django - send image back to http response without saving the image

I want to create a preview image before the actual form upload. I have a preview button for the user to first look at the photo be开发者_JAVA技巧fore submitting it. Once the use clicks the preview button, what is the best way in django to respond with an image without actually saving the image?

Thank you!


Pass a file-like such as StringIO to the HttpResponse constructor that contains the image data.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜