1. Launch Rails server
2. Launch editor
3. Drag and drop image
== Expected result ==
Image successfully uploaded
== Actual result ==
Client side: HTTP error occurred during file upload (404: File not found).
Server side: ActionController::RoutingError (No route matches [POST]
"/ckeditor/pictures&responseType=json")
== Other details (browser, OS, CKEditor version, installed plugins) ==
Firefox 39.0.3, Linux Mint 17, CKEditor 4.5.2.
plugins:
lineutils,widget,autolink,sharedspace,image2,youtube,confighelper,pastefromword,autogrow,notification,notificationaggregator,filetools,uploadwidget,uploadimage
I think the bug comes from the url used to upload which has an & instead
of a ? so Rails fail in interpreting the request.
--
Ticket URL: <http://dev.ckeditor.com/ticket/13650>
CKEditor <http://ckeditor.com/>
The text editor for the Internet
* status: new => closed
* keywords: Drag and Drop, Ruby on Rails =>
* version: 4.5.2 =>
* resolution: => invalid
Comment:
The error that you paste means that your backend does not work (the route
does not exist). That's not CKEditor's bug.
--
Ticket URL: <http://dev.ckeditor.com/ticket/13650#comment:1>
Comment (by CptMaumau):
But isn't it abnormal to have a url format like that?
Shouldn't it be: /ckeditor/pictures?responseType=json
--
Ticket URL: <http://dev.ckeditor.com/ticket/13650#comment:2>
* status: closed => reopened
* resolution: invalid =>
Comment:
You're right. I missed that. I recall that there's some tricky situation
with which config option you use (I guess you used filebrowserUploadUrl or
filebrowserImageUploadUrl). I'll pass this to my colleague.
--
Ticket URL: <http://dev.ckeditor.com/ticket/13650#comment:3>
Comment (by pjasiun):
You should use `uploadUrl` instead of `filebrowserUploadUrl`. `uploadUrl`
is the proper configuration for image upload. `filebrowserUploadUrl` is
the old configuration for a filebrowser plugin and it adds
`&responseType=json` and is used by image upload only because of the
backward compatibility with some file browsers.
I will add a comment to the `filebrowserUploadUrl` config to make it
clear.
--
Ticket URL: <http://dev.ckeditor.com/ticket/13650#comment:4>
* status: reopened => confirmed
* component: General => Documentation & Samples
--
Ticket URL: <http://dev.ckeditor.com/ticket/13650#comment:5>
Comment (by CptMaumau):
Thank you for the response.
I have now another issue, when I try to drag and drop an image on the
server side it raises: WARNING: Can't verify CSRF token authenticity
This is due to the request not sending an authenticity_token.
Maybe this is an error from the gem I am using so I will also notify them.
--
Ticket URL: <http://dev.ckeditor.com/ticket/13650#comment:6>
Comment (by pjasiun):
This is a CKEditor bug tracker, not a support channel. The open support
channel for CKEditor is [http://stackoverflow.com/ Stack Overflow]. Also
note that your question is about the Ruby on Rails plugin, CKEditor do not
have any `authenticity_token`, as far as I know.
--
Ticket URL: <http://dev.ckeditor.com/ticket/13650#comment:7>
Comment (by Reinmar):
The implementation of CSRF has of course nothing to do with CKEditor. It
needs to be done by the backend. CKEditor, however, perhaps needs to
integrate with this too (to use the CSRF) and for that the
http://docs.ckeditor.com/#!/api/CKEDITOR.editor-event-fileUploadRequest
event may be used.
--
Ticket URL: <http://dev.ckeditor.com/ticket/13650#comment:8>
* status: confirmed => closed
* resolution: => fixed
Comment:
I have updated docs, I have added note to the `filebrowserUploadUrl`
configuration options. I will be available in `docs.ckeditor.com` after
the docs rebuild.
--
Ticket URL: <http://dev.ckeditor.com/ticket/13650#comment:9>