David Bogus on 1 Sep 2007 03:58:58 -0000


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PhillyOnRails] Using Net::HTTP to make multipart file uploads

  • From: "David Bogus" <davidbogus@gmail.com>
  • To: talk@phillyonrails.org
  • Subject: Re: [PhillyOnRails] Using Net::HTTP to make multipart file uploads
  • Date: Fri, 31 Aug 2007 23:58:42 -0400
  • Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=bSlat71jSWIonY3ZmNgcWUpJCXwxhoPUt4XI6WcrEjdTPbavLyeH1NoUv8tyBRMX8G5aOWAtSkTdggKrExhO7AJ+l8wHUJqlxi+vuU0FlhQ5vgX6d4hk1vwztlIl3970cJ6jkaBK+p49Z6MGWfNlf02KZQMZ9sOdJDDpAVXAi3E=
  • List-archive: <http://lists.phillyonrails.org/pipermail/talk>
  • Reply-to: talk@phillyonrails.org
  • Sender: talk-bounces@phillyonrails.org

I haven't done multi-file upload in ruby myself, but you might want to
take a look at MERB.  The author wrote it, in part, because of not
liking file up loads in rails.

Dave

http://brainspl.at/articles/2006/10/18/merb-is-useable-and-a-gem

>From an example merb application
http://svn.devjavu.com/merb/mrblog/trunk/dist/app/controllers/files.rb

  def upload
    FileUtils.mv params[:data][:tempfile].path,

Merb::Server.config[:dist_root]+"/public/files/#{params[:data][:filename]}"
    render_no_layout
  end




-- 
Dave's Definitions: Morning, is after I've slept for more than four
hours. Lunch is the second meal of the day no matter the hour of
consumption. A long drive is one longer then you have last slept.
Ineffable, if you don't understand I couldn't possibly explain it.
_______________________________________________
To unsubscribe or change your settings, visit:
http://lists.phillyonrails.org/mailman/listinfo/talk