Setting image

Hello All,

I am uploading an image from disc. While choosing the image I want to show that image on the UI.

How can I do that?

I am using paperclip gem.

Thanks,

Avi

Hi Avi,

Good Day,

Follow this url, very simple. Use it and enjoy.

http://saravani.wordpress.com/2012/03/14/preview-of-an-image-before-it-is-uploaded/

Thanks,

Maddy :slight_smile:

Hello All,

I am uploading an image from disc. While choosing the image I want to show
that image on the UI.
How can I do that?
I am using paperclip gem.

before html5, i think this is not possible since javascript shouldn't have
access to your
file system. what you can do is upload the image first then show a preview
after.

The requirement is:-

When we click on the button to choose the file, after choosing, the image should be shown in the ui in IFRAME or something.

Not sure how to do that…

The requirement is:-

When we click on the button to choose the file, after choosing, the image
should be shown in the ui in IFRAME or something.

Not sure how to do that...

this is a shameless plug but you can look at my blog if you need help in
doing this

http://jimlabs.heroku.com/posts/multiple-image-upload-with-preview-using-ajax-and-jquery