How to save an image from my DOM to backend in django?

129 Views Asked by At

I am building a web app using django, now one part of it is a small image editor which i created using Fabric.js, in which the user can upload an image(completely js code, not connected with the backend), and do some editing, and upload the resulting image, only thus time, it has to be stored in my MEDIA of django app, i just have no idea how to get the last step done, i.e., how do i get an image which is available only in my DOM(document object model) at that instance and save it to my backend

1

There are 1 best solutions below

0
Guillermo Silva On

http://fabricjs.com/fabric-intro-part-3#serialization

with serialization you can get the image as fabric object or as SVG, then this object can be received by an api that you can create on django