storing large string from browser

Mike
Mon, 17 Jan 2011 00:00:03 -0000

Hi,

I''m getting XML data from a plugin using client side Javascript and
attempting to get it stored off on the server.  My first attempt was
updating the value of a hidden form field then storing it away in a
model/table from the controller upon post/put. It turns out the data
frequently takes up more than 65k of space.  This is truncating my
data due to row size limitations of MySQL.

I''m looking at Paperclip and CarrierWave as possible ways of storing
the data, but I''m not sure if they are the best solution.  I''m
running
into these two issues:

1) Both appear to want files.  I''m not sure of the best way to handle
this.  Should I mimic a file/multipart form on the client or store the
data to a temp file on the host in the controller before handing it
off to Paperclip/CarrierWave to manage?  (I''m not clear on the
implementation details of either, though am more likely to figure out
the temp file version quicker)

2) I need access restrictions and do not wish to place the files under
public/.  Is there an easy way to place it elsewhere, but still offer
efficient use of resources for download?

BTW, I''m using Rails 3, MySQL, Linux/Apache/Passenger.

Thanks in advance,
Mike

--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at