Store file into mysql using ruby on rails

Hi plz tell me how to upload a file into mysql table in Ruby On
Rails … ?
also tell me how to read bytes from a file & stores in a variable in
ruby …

thanks :slight_smile:

On Mon, Jul 19, 2010 at 9:27 AM, Prabhat T. [email protected]
wrote:

Hi plz tell me how to upload a file into mysql table in Ruby On
Rails … ?
also tell me how to read bytes from a file & stores in a variable in
ruby …

Have you googled something about this? What you didn’t understand?
What you couldn’t find?
Please, don’t ask others to do your job.


Leonardo M…
There’s no place like ~

  1. Look for the file upload helper for rails — google this and you
    should
    have a start, plenty of tutorials.

  2. The one thing is when you create your model (this is only for mysql)
    is
    that if your text files are of any large size (I think more than ~64000
    chars??), you need to user the longtext datatype in mysql otherwise your
    files will get truncated.

Hey bro thanks for ur reply … and plz don’t scold me dude … [:P]
well i have done it … actually i got confused at a point which was
base less he he he … !

have great days ahead … buddy tkcr … !

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