PerfectlyNormal / tinymce-rails-imageupload

Image upload plugin for TinyMCE and Rails with the asset pipeline
MIT License
149 stars 153 forks source link

additional parameter in upload? #10

Closed syllogismus closed 11 years ago

syllogismus commented 12 years ago

hi, is it possible to have additional parameters in the upload form? would be nice if eg it would pick up a predefined array or sthing where u can set the parameter. i need that for assigning the right 'image-folder'. (has_many-paperclipsmodels)

thx

minaguib commented 12 years ago

+1, for precisely the same reason as @syllogismus pointed out

In a classical CMS, you typically want uploaded images to be placed in a folder named after the article it belongs to. This is useful not only as a back-end thing, but also in the front-end "insert an image" dropdown listing the remote images.

The current flat namespace makes the controller handling the POST aware of nothing besides the uploaded file. Would be nice if we can, at <%= tinymce %> invocation, pass additional keyvals that are relayed into the form for POSTing.