Fix attaching images in CKEditor via drag and drop

The URL used for the generated request was
`/ckeditor/pictures&responseType=json`. This is a known issue in the
ckeditor gem, and it's suggested to add a `?` at the end of the URL in
order to fix it.

I haven't added a test for this case since simulating dropping a file in
the browser with Selenium/Capybara seems to be quite tricky and I
haven't found a solution guaranteed to correctly emulate what users do.
This commit is contained in:
Javi Martín
2020-04-17 21:08:07 +02:00
parent 56bc0c6e41
commit 8e4f9d5173

View File

@@ -10,7 +10,7 @@ CKEDITOR.editorConfig = function( config )
config.filebrowserImageBrowseLinkUrl = "/ckeditor/pictures";
config.filebrowserImageBrowseUrl = "/ckeditor/pictures";
config.filebrowserImageUploadUrl = "/ckeditor/pictures";
config.filebrowserImageUploadUrl = "/ckeditor/pictures?";
config.filebrowserUploadMethod = "form";
config.allowedContent = true;