Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

app to upload multiple large files

Status
Not open for further replies.

gagz

Programmer
Nov 21, 2002
333
US
I had to build a web app for someone that just did basic file uploading, max of 6 or 7 mb, one at a time. That worked great. Now they are getting browser time out for larger files (10+ mb, and they want to go up to 50 mb). THey also want to be able to do more than one at a time...

my question is, can this even be done using an <input type=file> element, or is there a better way? I don't know how else to get past the browser time outs. I have increase the settings in php.ini and httpd.conf to accomodate for size...

suggestions would be VERY helpful.

thanks.
 
take a look at ftp functions

______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
as you've probably worked out, this has nothing to do with php or other server-side scripting languages (probably). it is an inherent issue with the browsers timing out. probably different browsers will time out at different points.

there is no easy fix for this although some sites talk about registry hacks.

but ... some thoughts nevertheless:

1. write a java applet to handle the upload for you (embed in the web page).
2. ditto but with flash
3. i can't help thinking that the timeouts probably are not too clever. try writing a bit of javascript to do something to the page every now and then. that might fool it.
4. if 3 doesn't work try creating a frameset with a 1pixel frame. get some js in that frame to do something to the main frame during the file upload (i.e. externalise the change to try and fool the browser).
5. use ajax/javascript to bung the file up to the server in chunks. reasssemble at the end of the process. this is neat as you can provide lots of bi-directionality. I think that the relevant webpage will need to be an html application (.hta file) and thus on the user's machine in order for it to have local filesystem access but you could experiment with this: I might be wrong.
6. use webdav (i prefer this to ftp: at least on windows machines)
 
I was wonder if i just wrote a script that incorporated some of the php functions mentioned above, i could write some sort of lock file before the ftp started, then when it finished, have the script remove the lock file... though i'm assuming i'd have to spawn a page to reload and track it while the ftp completed, then once the lock file was gone, have javascript close that page and refresh the parent...

sound logical?
 
i'm a bit lost by your last post. how are you intending to upload the files? by ftp? then php is not involved unless your server has read access to your desktops (which would be unusual). and i'm not sure that javascript has any ftp functions that you could use to automate the process.

so ... the user is going to know when the uploads have happened because his/her ftp client will tell him/her.

but if you want this to be part of a workflow system (or similar) then ftp is probably going to break your design brief. I'd take a look at my javascript ideas above. easy and quick to test.
 
what jpadie said is right, you need somehow to keep the browser alive to stop it timing out - javascript is a good option as you could (probably) get feedback from the ftp functions.

______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top