Handling large file uploads
Posted: Wed Apr 05, 2006 3:43 pm
Hi,
currently I'm creating a website that will primarily serve as a document management system. Recently I have looked into large file uploads (extensions, java applets, ...) but haven't found the perfect solution. Java applets I cannot use, since I do not want everyone to have a JRE installed. The problem is that this site, once finished, is expected to be used alot, so multiple file uploads and downloads are possible.
By large files I mean >100Mb, but not something like over 1Gig. I have a server with loads of bandwidth, but only 512Mb RAM, so I'm afraid that the RAM for the server will fill up quite quickly.
Does anybody know of a way to bypass the whole file being loaded into RAM while it is being uploaded/downloaded?
I know of the php vars to set the max size for memory, max upload size, ... but cannot seem to find how this is handled internally by PHP in respect to RAM.
Also a progress bar would be nice, but not necessary.
As a side question: would it be wise to store these files into a db? The system will have a pretty complex auth system, so this would seem to solve alot of my problems at first sight (backup, moving files inside the file tree, ...), but I cannot afford to overlook some of the downsides, hence the question.
Best regards,
Koen Calliauw
currently I'm creating a website that will primarily serve as a document management system. Recently I have looked into large file uploads (extensions, java applets, ...) but haven't found the perfect solution. Java applets I cannot use, since I do not want everyone to have a JRE installed. The problem is that this site, once finished, is expected to be used alot, so multiple file uploads and downloads are possible.
By large files I mean >100Mb, but not something like over 1Gig. I have a server with loads of bandwidth, but only 512Mb RAM, so I'm afraid that the RAM for the server will fill up quite quickly.
Does anybody know of a way to bypass the whole file being loaded into RAM while it is being uploaded/downloaded?
I know of the php vars to set the max size for memory, max upload size, ... but cannot seem to find how this is handled internally by PHP in respect to RAM.
Also a progress bar would be nice, but not necessary.
As a side question: would it be wise to store these files into a db? The system will have a pretty complex auth system, so this would seem to solve alot of my problems at first sight (backup, moving files inside the file tree, ...), but I cannot afford to overlook some of the downsides, hence the question.
Best regards,
Koen Calliauw