[Answer]-How to create a file inside the django template

1👍

The getimageuri() actually return the file itself, uriencoded, which looks like:

data:image/png;base64,iVBORw0KGgoAA...

If you want to store this image server side, you have to send it to the server, preferably using AJAX, and then processing on server side by throwing away the text before the , including, and then creating an image file from the base64 string using django’s File functions.

Leave a comment