0

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

  • you'll need to create an endpoint on your server that accepts image uploads. It's then just a matter of posting the image to the server as a base64 dataurl string – melchiar Jun 24 '21 at 01:51

1 Answers1

0

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

Guillermo Silva
  • 371
  • 2
  • 7