Search code examples
jquerycakephpblueimp

Blueimp fileuploader images are not showing using cakephp


I am using cakephp and having list of files on debug and there is no single error.

 {"files":
      [
           {"name":"download.jpg","size":19415,"url":"http:\/\/amportal.local\/app\/webroot\/files\/download.jpg","deleteUrl":"\/work\/delete_file\/?file=download.jpg","deleteType":"DELETE"},
           {"name":"download1.jpg","size":19415,"url":"http:\/\/amportal.local\/app\/webroot\/files\/download1.jpg","deleteUrl":"\/work\/delete_file\/?file=download1.jpg","deleteType":"DELETE"}
      ]
 }

The request from Ajax has been sent successfully. but the files (tables rows) are not listing, even when I paste

http://amportal.local/app/webroot/files/download.jpg

in url I can see the image.


Solution

  • for other to know. I was using a layout which contains html and json. the callback(response from ajax) should be pure json. I have a tiny null error after json