Upload files

Reply

Join Date: Nov 2007
Posts: 34
Reputation: chicago1985 is an unknown quantity at this point 
Solved Threads: 0
chicago1985 chicago1985 is offline Offline
Light Poster

Upload files

 
0
  #1
Feb 23rd, 2009
I have a PHP (version 5) site on a Windows server that allows uploading of files into our Windows server. I currently allow the user to upload up to 10 files at once. If users upload files as big as 20 mb or more slows the upload process down. Should I just allow one file upload at a time for better performance? I was wondering how other PHP developers handle this?
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 148
Reputation: mschroeder is on a distinguished road 
Solved Threads: 25
mschroeder mschroeder is offline Offline
Junior Poster

Re: Upload files

 
0
  #2
Feb 23rd, 2009
This is one of the weaknesses of php. You can not use php to check the file size until AFTER the file/image has been SUCCESSFULLY uploaded to the server.

You also can not use javascript to access the client side file system. This is an area where i see Adobe Flash upload scripts really fill the gap. As they tend to be able to check the size of the file prior to the upload occurring.

I'd suggest looking into some of the many flash upload scripts that exist and how to tie them into php, unless someone else has a more controlled solution.
If you're question/problem is solved don't forget to mark the thread as Solved!

-- Code I post is usually but not always tested. If it is tested it will be against 5.2.11 or 5.3.0
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 24
Reputation: david.1982 is an unknown quantity at this point 
Solved Threads: 0
david.1982 david.1982 is offline Offline
Newbie Poster

Re: Upload files

 
0
  #3
Feb 24th, 2009
I first display a message to the user letting them know the maximum size of files they can upload (post_max_size), then I use a flash upload script to subtract from that number for each file they choose to upload. When they run out of space, I disable the browse files button.

I wish I still had the link for the flash script I am using. If I can track down the original source I will post it here.
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 78
Reputation: shadiadiph is an unknown quantity at this point 
Solved Threads: 0
shadiadiph shadiadiph is offline Offline
Junior Poster in Training

Re: Upload files

 
0
  #4
Feb 24th, 2009
are you uploading to a folder tricky question to answer you could try making a loop to upload one at time make the submit page call to itself until the files value return a false value then exit but this will still take the same amount of time i would of thought. That is how i handle my news letters when emailing them to alot of people
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC