Re: File upload example

2002-03-12 Thread Stas Bekman
Rich Bowen wrote: > I am sure that this is a FAQ, but I had a very hard time finding > examples of code for doing file upload. I wanted to post this here in > order to have it in the permanent record so that other folks don't have > to spend days figuring this out. Great Rich! I think we can do b

Re: File upload example

2002-03-12 Thread David Wheeler
On Tue, 2002-03-12 at 03:57, Rich Bowen wrote: > my $form = Your::Class::form(); # Wherever you put this function > if (my $file = $form->{UPLOAD}) { > my $filename = $file->filename; # If you need the name Actually, if you want the name, it's a really good idea to just get the basename, sin

Re: File upload example

2002-03-12 Thread Rich Bowen
On Tue, 12 Mar 2002, Stas Bekman wrote: > Rich Bowen wrote: > > I am sure that this is a FAQ, but I had a very hard time finding > > examples of code for doing file upload. I wanted to post this here in > > order to have it in the permanent record so that other folks don't have > > to spend days

Re: File upload example

2002-03-12 Thread Robert Landrum
At 9:01 AM -0800 3/12/02, David Wheeler wrote: >On Tue, 2002-03-12 at 03:57, Rich Bowen wrote: > >> my $form = Your::Class::form(); # Wherever you put this function >> if (my $file = $form->{UPLOAD}) { >> my $filename = $file->filename; # If you need the name > >Actually, if you want the name,

Re: File upload example

2002-03-12 Thread D. Hageman
Mozilla sends a fully qualified path name ... just an FYI ... On Tue, 12 Mar 2002, Robert Landrum wrote: > At 9:01 AM -0800 3/12/02, David Wheeler wrote: > >On Tue, 2002-03-12 at 03:57, Rich Bowen wrote: > > > >> my $form = Your::Class::form(); # Wherever you put this function > >> if (my $file

Re: File upload example

2002-03-12 Thread John Saylor
Hi ( 02.03.12 06:57 -0500 ) Rich Bowen: > Comments welcome, YMMV, Caveat Emptor, and all that. I have found that some browsers put the file in the value matching the parameter name instead of putting a file upload object there. So your code should check the value to see if it is a path AND a one

Re: File upload example

2002-03-12 Thread Rich Bowen
On Tue, 12 Mar 2002, John Saylor wrote: > Hi > > ( 02.03.12 06:57 -0500 ) Rich Bowen: > > Comments welcome, YMMV, Caveat Emptor, and all that. > > I have found that some browsers put the file in the value matching the > parameter name instead of putting a file upload object there. So your > code

Re: File upload example

2002-03-13 Thread John Saylor
Hi > On Tue, 12 Mar 2002, John Saylor wrote: > > I have found that some browsers put the file in the value matching > > the parameter name instead of putting a file upload object there. ( 02.03.12 18:36 -0500 ) Rich Bowen: > That's not really necessary, as Apache::Request does that for you. May

Re: File upload example

2002-03-13 Thread Rich Bowen
On Wed, 13 Mar 2002, John Saylor wrote: > Hi > > > On Tue, 12 Mar 2002, John Saylor wrote: > > > I have found that some browsers put the file in the value matching > > > the parameter name instead of putting a file upload object there. > > ( 02.03.12 18:36 -0500 ) Rich Bowen: > > That's not reall