-
Notifications
You must be signed in to change notification settings - Fork 207
KCFinder & Json responses #155
Comments
Having the same issue... |
I've changed kcfinder\core\class\uploader.php.
|
I had the same issue. |
…e if requested by using the url param format=json
I faced the same issue after updating to the latest CKEditor, I was able to get it working using this PR #168 and adding &format=json into the upload url. Note the file browser still needs the javascript i believe |
if requested by using the url param format=json From: Seamus Lee <[email protected]> Date: Sat, 28 Apr 2018 07:34:19 +1000
I'm getting an issue which says incorrect server response while drag and drop. The response which I'm getting is '<script type="text/javascript">window.parent.OnUploadCompleted(201, 'https://www.proprofs.com/api/ckeditor_images/image(110).png', 'image(110).png', '') ;</script>' which is not a json. Please can you tell me exactly how and from where I'm getting this response . And How will i resolve this so that i can get a json respone. |
These are the files in the correct file structure that work fine for me in my projects. I can upload images by drag and drop in ckeditor, I can manually select a file and click "send it to the server", I can upload in kcfinder; browse file and upload, and even drag and drop in kcfinder. (you have to change the upload authorisation in /kcfinder/conf/config.php. You can use a session as in my example or maybe someting else...) Kind regards |
Thank you so much for this. I was having trouble with "invalid server response" when paste image into CKEDITOR. I just replace the original |
Signed-off-by: Michiel Dethmers <[email protected]>
Signed-off-by: Michiel Dethmers <[email protected]> (cherry picked from commit 4de22de)
Resolve sunhater#155 by allowing kcfinder to send back a JSON response if req…
Is it an option in the current version of KCFinder to get a json response after uploading an image? I tried version 2.51, 3.12 and 3.20 test 2.
I'm using CKEditor with the Upload Image plugin for drag&drop upload and KCFinder. File is uploading using drag&drop as it should be, but then I get an "Incorrect server response" error.
In the demo (http://sdk.ckeditor.com/samples/fileupload.html#uploading-dropped-and-pasted-images) using CKFinder, I see for example the following json response with firebug:
{"fileName":"golf.jpg","uploaded":1,"url":"/userfiles/files/golf.jpg"} which works perfectly.
In my project using KCFinder, I get for example the following response:
<script type='text/javascript'> var par = window.parent, op = window.opener, o = (par && par.CKEDITOR) ? par : ((op && op.CKEDITOR) ? op : false); if (o !== false) { if (op) window.close(); o.CKEDITOR.tools.callFunction(0, '/userfiles/images/contact%281%29.jpg', ''); } else { alert(''); if (op) window.close(); } </script>which isn't working because no json.
Any help would be very much appreciated...
The text was updated successfully, but these errors were encountered: