django-contenttools-demo
django-contenttools-demo copied to clipboard
The insert images is broken
Hello, I was playing around with your demo and I have notice that you can upload the images correctly. Then, when you press insert it fails. The media file has the uploaded image.
Error is in image-uploader.js:
SyntaxError: JSON.parse: unexpected character at line 3 column 1 of the JSON data
http://localhost:8000/static/js/image-uploader.js
Line 49
@ahmedatya @prusayn thank you for raising the issue and sorry for the delay in responding, I will investigate and get back to you.
Hi guys,
I have tried to replicate the error without luck. The image uploading and insertion worked fine for me. Below is a detail of the JSON response I get from add and update image. Does your response match it?
Image add response:
{
"id":18,
"created":"2016-07-22T10:06:36.276293Z",
"image":"http://localhost:8000/media/images/Simulator_Screen_Shot_10_Mar_2016_03.14.53.png?_ignore=1469181996.278784",
"name":"Simulator Screen Shot 10 Mar 2016 03.14.53.png",
"size":[
640,
1136
],
"edited_width":600,
"edited_crop":null,
"edited_direction":null
}
Image update response:
{
"id":18,
"created":"2016-07-22T10:06:36.276293Z",
"image":"http://localhost:8000/media/images/Simulator_Screen_Shot_10_Mar_2016_03.14.53.png?_ignore=1469181997.492966",
"name":"Simulator Screen Shot 10 Mar 2016 03.14.53.png",
"size":[
640,
1136
],
"edited_width":600,
"edited_crop":"0,0,1,1",
"edited_direction":null
}