Regarding this well-known quote, often attributed to Tim Van Wassenhove's
famous "12 Dec 2003 09:45:01 GMT" speech:
[color=blue]
> On 2003-12-12, Stephane <Stephane@INVALID.fr> wrote:[color=green]
>> Hello,
>>
>> I need to allow an end user to upload video files on a server and in the
>> same time to put the file name and a few infos in a database. It must be
>> very simple for the end user, and uploading with a browser in a form
>> would be perfect since it allows to upload and fill a form in the same
>> time.
>>
>> I'll have full control of the server (no max_size problem etc). The end
>> user connexion is ADSL, the server is on a 100mb internet connexion.
>>
>> But I'm worried because the file upload by PHP (at least what I code
>> usually) will probably timeout (the files will be 200mo at least) or
>> have problems, and you can't resumean aborted transfert. FTP would be
>> better but it is not as simple for the end user, especially because he
>> has to give some more informations (style of the video, how long it has
>> to stay on the server etc) wich will be stored in the database..
>>
>> What would you use to keep the operations easy, reliable and OS
>> independant ? Thanks for any suggestion[/color]
>
> ILHO is ftp the only way to go.
> What you could do is let them just submit the text fields, once they
> have done this, you provide them a "config file" that contains the
> settings where things need to be uploaded...
>
> Now the client only has to call a command like ftp < settings.txt
> With a little program that has dnd support, the client would only have
> to dnd the file over that program to start the upload....[/color]
On that note, if you could put each user's files into a seperate directory
from the FTP, you could make it an only marginally more difficult process:
1.) They upload the file via FTP.
2.) When the upload completes, they go to the website and log in.
3.) They get a list of their "uploads" directory, and can pick one or more
files.
4.) After selecting the correct files, they go to a screen where they can
add the proper "tagging" information.
5.) The PHP script then...
o Moves the files to their proper place on the website (if needed)
o Associates the information with the file(s)
Hairballs you might have to watch out for are:
o Making sure the file is comepletely uploaded before moving it.
o If the file gets moved to a public area, watch for filename collisions.
Rename the files if needed, and make sure the tagging reflects the rename.
o Make sure no one can hijack the system and use it to "implant" files in
unauthorized areas.
Barring that, I think PERL, with its more "streaming" (versus PHPs "get the
upload, then process the output") treatment of POST data, has a few good
upload progress-bar scripts. It might be something to check out.
--
-- Rudy Fleminger
--
sp@mmers.and.evil.ones.will.bow-down-to.us
(put "Hey!" in the Subject line for priority processing!)
--
http://www.pixelsaredead.com