There was a minor annoyance with all version of Fleximage up to this point. If you upload an image to a model, and validation fails for whatever reason, then you would have to find the image on your disk again, re-upload the image again, before you resubmit the form. Wouldn’t it be nice of the file stayed uploaded, even if the record isnt ready to be saved yet? How about getting a preview of the uploaded image too?

It’s all possible with the latest version of Fleximage up on GitHub. Checkout this GitHub wiki page for details.

3 Responses to “Fleximage now form redisplay safe”

  1. IonStorm Says:

    Hi Squeegy,

    I am sorry to be offtopic here but I couldn’t find the cleanest way to call different action when calling formatted_photo_path it always maps to show action, but what if I have show_thumb action? How can I do it?

  2. Alex Wayne Says:

    You do it the same you call other actions with restful routes.

    1
    2
    3
    4
    5
    6
    7
    
    #routes.rb
    map.resources :photos, :member => { :thumb => :get }
    
    #show.erb.html
    <%= formatted_thumb_photo_path @photo, :jpg %>
    
    #calls template in thumb.jpg.flexi
  3. Will Merrell Says:

    I have used fleximage for a while now, and I like it. I was interested in this new ‘form redisplay’ stuff, but I cannot get it to work.

    I see the image in the tmp folder, but I cannot figure out how to actually get the saved image to be loaded when I save the record.

    Do you have a working example? Or a little more documentation? I am probably close, but I am still missing something.

    —Will

Leave a Reply