Reply to Re: Uploading multiple files...

Your name:

Reply:


Posted by Shawn Wilson on 09/19/05 17:29

"Tyrone Slothrop" <ts@paranoids.com> wrote in message
news:i5gti15hgijegf3pmrnb8vgo13fsu62els@4ax.com...
> On Mon, 19 Sep 2005 07:45:43 GMT, "Shawn Wilson"
> <firstinitial_lastname@dvigroup.net> wrote:
>
>>I'll admit that I haven't looked too hard just yet on this one, but
>>wondered
>>if the group might have a quick answer.
>>
>>Is it possible to use PHP to upload multiple files from a client? And
>>what
>>I'm thinking is for the client to choose one local folder and for the
>>script
>>would upload every file in that folder that matches a file mask (*.jpg
>>specifically).
>>
>>It's for my photo album and at present I FTP the files to an import folder
>>and run my scripts from there that resize and insert into my SQL database.
>>If I can make it one step though, that would be great.
>>
>>I've seen many JavaScript or applet ways to do this out there, but as I'm
>>not a java programmer I'd like to stay with what I know (or am getting to
>>know)... in this case PHP. Unless it's only possible with java, then I
>>guess I'll have to learn that.
>>
>>Thanks in advance!
>
> Short answer: Yes, it is possible.
>
> Longer answer: Review the page in manual.
> http://www.php.net/manual/en/features.file-upload.php
> Just create as many input fields as you need as specified in the
> section "Example 38-3. Uploading array of files".

Yeah, if that's where we're left with PHP is doing an individual file box
for each file, then you tell me if YOU would do that for 300 files? *smile*

I guess maybe I'm stuck looking for a java solution unless I can maybe
'guess' at file names since they are sequential and pre-fill form fields
maybe...

Here's an idea... given that all the files I want to upload will be in one
local directory and all of them will be sequentially named [003000000.jpg
through 003000300.jpg] for example... I could make a first screen asking how
many files there are and for the first file name. Then submit that to the
next page that would make the input boxes and pre-fill their value="" with
file names based on my input. Then I could just submit and watch them go.

How dirty is that though?? Is there a more elegant way to acomplish that
without having the user browse for 300 files manually?

--
Shawn Wilson

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация