django-contenttools-demo icon indicating copy to clipboard operation
django-contenttools-demo copied to clipboard

The insert images is broken

Open ahmedatya opened this issue 9 years ago • 3 comments

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.

ahmedatya avatar Dec 04 '15 02:12 ahmedatya

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

prusayn avatar Jul 04 '16 19:07 prusayn

@ahmedatya @prusayn thank you for raising the issue and sorry for the delay in responding, I will investigate and get back to you.

guillaumepiot avatar Jul 06 '16 09:07 guillaumepiot

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
}

guillaumepiot avatar Jul 22 '16 10:07 guillaumepiot