hi all, where can i find a complete list of the details and methods available for an uploaded file? so far i know of the basics like (among others): @params[''image''][''file''].original_filename @params[''image''][''file''].content_type @params[''image''][''file''].read @params[''image''][''file''].size etc thanks, -felix
On 5.10.2005, at 4.37, Felix McCoey wrote:> hi all, > > where can i find a complete list of the details and methods available > for an uploaded file? > > so far i know of the basics like (among others): > @params[''image''][''file''].original_filename > @params[''image''][''file''].content_type > @params[''image''][''file''].read > @params[''image''][''file''].size > etc@params[''image''][''file''].public_methods gives you an array of method names. //jarkko> > thanks, > > -felix > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails > >-- Jarkko Laine http://jlaine.net http://odesign.fi _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Oct 4, 2005, at 6:37 PM, Felix McCoey wrote:> where can i find a complete list of the details and methods available > for an uploaded file? > > so far i know of the basics like (among others): > @params[''image''][''file''].original_filename > @params[''image''][''file''].content_type > @params[''image''][''file''].read > @params[''image''][''file''].sizeThe file is an instance of either StringIO or Tempfile, depending on its size. The original_filename and content_type methods are tacked on by the CGI library. Do ''ri StringIO'' and ''ri Tempfile'' on the command line for more info on these classes. Best, jeremy -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (Darwin) iD8DBQFDQ28/AQHALep9HFYRAm+XAJ49yVgbSZL2mFnnFI3GpeQf3fJeRwCgrQCT 4AmV9fQJw4yky4pdDIe86yw=c//N -----END PGP SIGNATURE-----