Uploadng images(needy)

thanq for suggestions…
but im using fileutils and im giving user to upload only one
image…
so for that im using filutils

in app…i wrote the code as

#File.open("/public/images/#{self.id}",“wb”)

{ |f| f.write(params(register[‘photo-url’]).read) }

this code is writing the file to public folder but
it’s content is not reading…
it’s showing 0bytes in that image…
plzzzz help me very very urgent
md anas

On 20 Apr 2008, at 11:08, Anas Ali wrote:

Well I don’t know what your the name of your form parameters are, but
that looks very wrong. It’s more likely to be something like params[…]

Fred

Anas Ali wrote:

thanq for suggestions…
but im using fileutils and im giving user to upload only one
image…
so for that im using filutils

in app…i wrote the code as

#File.open("/public/images/#{self.id}",“wb”)

{ |f| f.write(register[‘photo-url’]).read) }

“register[‘photo-url’]” is the parameter taken from the form(i.e.
view)
this code is writing the file to public folder but

it’s content is not reading…
it’s showing 0bytes in that image…
plzzzz help me very very urgent
md anas

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs