tsechingho / ckeditor-rails

Integrate CKEditor javascript library with Rails asset pipeline
https://github.com/tsechingho/ckeditor-rails
MIT License
213 stars 132 forks source link

Is there an easy way to pass the CSRF token for image upload? #5

Closed connectedtrips closed 11 years ago

connectedtrips commented 12 years ago

I'm using Devise to authenticate sessions and I'm getting kicked out after image upload.

tsechingho commented 12 years ago

I am not sure how you upload image.

You can get CSRF via javascript and insert it to your upload form before submit. jQuery example:

$('meta[name="csrf-param"]').attr('content')
$('meta[name="csrf-token"]').attr('content')

Or you can look up https://github.com/galetahub/ckeditor to have some idea.