2π
I wonβt post the full code here just some guidance, everything from StackOverflow:
First you need to send your base64 image to django using AJAX: https://stackoverflow.com/a/13198699/263989
Then get the base64 in an AJAX function:
from django.http import HttpResponse
def get_bas64(request):
if request.is_ajax():
# process the image
return HttpResponse('')
To convert the base64 string to an image using PIL https://stackoverflow.com/a/19911883/263989
π€fasouto
Source:stackexchange.com