Closed computeus closed 12 years ago
I am experiencing the same issue. I found it to happen in form base file uploads. When using drag and drop ajax based upload - there is no problem.
thanks you for feedback my redactor config(javascript) is created in helper. As far as I know CSRF token can't get in other project.
Now, you can custom redactor-rails config....
next time i will move redactor.yml to javascript... because i know only javascript can get CSRF token...
so ... rubinsh you can get computeus example code...
@SammyLin - I don't understand what you want me to do. I don't have a working code example, as I have the same problem myself. I don't know how to add CSRF token to the js, so I can't give an example of a working code.
I looked again now, and I'm pretty sure that this post may help: https://github.com/galetahub/ckeditor/issues/36
since they've had the same problem with uploading images in CKEDITOR
@SammyLin - what do you think?
this is helpful for me. i will try fix the issue.
@rubinsh thanks a lot
@rubinsh
i fix the issue
https://github.com/SammyLin/redactor-rails/commit/b98e274c63da1dca63cb09ee4052308c69c1a743
you can try
gem "redactor-rails", "~> 0.3"
This still seems to be a problem. Using 0.3.2. When the "Choose File" button is clicked on the "Insert Image" dialog, it triggers the following warning:
"WARNING: Can't verify CSRF token authenticity"
This destroys the current session, which (in our case) causes a user to be logged out.
Drag-upload, however, works just fine.
I'm on 0.3.3 and still have this issue with the Choose File button
Drag-and-drop also works fine
I am getting CSRF errors with the photo upload.
Adding csrf-param option to the imageUpload url will be good.
Example code: