SammyLin / redactor-rails

This repo is deprecated. Please check out official gem for Redactor 2. https://github.com/Redactor2/redactor2_rails
MIT License
389 stars 253 forks source link

Using Image Upload w/Application in a sub-URL #147

Open ut opened 9 years ago

ut commented 9 years ago

I have a rails app with redactor-rails running in a sub-URL like http://www.domain.com/sub/. I could easily add the sub-URL to the paths at config.js for imageUpload, imageGetJson, etc. But I could not find a configuration to add the sub-URL for the image URL which is used for uploaded images within redactor. The URL starts directly with /system, which does not work, if the application runs in a subdirectory of domain:

<img data-verified="redactor" data-save-url="/system/redactor_assets/pictures/1/1505.jpg" src="/system/redactor_assets/pictures/1/1505.jpg">