I'v installed this https://github.com/tsechingho/ckeditor-rails lib into my Rails application. I would like to use CkEditor image upload functionality, but i'dont know how to write the backend logic, how to handle request, save file and send a response back to CkEditor to display uploaded image.
The CkEditor's configuration is the following:
CKEDITOR.replace( 'editor1', {
language: 'en',
filebrowserImageUploadUrl : "/upload",
filebrowserUploadUrl : "/upload",
});
Rails function
def upload
@func_num = params["CKEditorFuncNum"]
@ck_editor = params["CKEditor"]
render :layout => false
end
