Magnus Manske wrote:
I've found some nice classical ogg files online (CC-BY-SA-2.0). However, some are larger than 20 MB. Uploading those leads me back to a blank upload page, without comment or error. 20MB seems to be a magical limt for PHP.
Is there a way to bypass that limit? I'd hate to have to cut perfectly good ogg files.
PHP stores the entire contents of the POST request in memory, as it is receiving it. That's why we can't allow arbitrarily large uploads, the server would run out of memory. In any case, HTTP does not support resuming for uploads, so it's quite fragile.
Ideally, we should use a protocol which is designed for uploading large files efficiently and robustly. FTP is one such protocol, that's what archive.org use for their video and audio uploads. They do it like this:
1. When a web account is created, an FTP account and home directory is set up. 2. Via a PHP script, the user gives the name of the collection of files they want to upload. The script creates a directory for the upload on the FTP server. 3. The user logs in to the FTP server using their web username and password. They upload the files using an FTP client. 4. The user "checks in" the files. There is an HTML file in the FTP directory called "CLICK_HERE_WHEN_DONE.htm" which does this operation via a meta refresh. Alternatively, it's done automatically 48 hours after the directory creation.
So we could set up something like that. Or maybe we could just outsource our large file handling to them. It'd certainly save on hard drive costs, wouldn't it?
-- Tim Starling