[Answer]-Django JsonResponse from POST file upload

1👍

The JS snippet that you have posted shows where you need to handle the returned JSON. The data is passed to your success function as “responseText”:

this.on("success", function(file, responseText) {
  file.previewTemplate.appendChild(responseText);
});

but you will probably want to use JSON.parse to convert it to actual JS objects.

Leave a comment