Tim Starling schrieb:
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.
Or we could use a "mixed" solution: * I upload my file to a publically accessible file (ftp or http, no matter), if it's not already online * I call "Special:Upload?source=web" * The upload <input> is replaced with a simple text input row for the URL * Instead of using the PHP upload mechanism, MediaWiki just copies the file through ftp/http
Advantages: * Simple changes to MediaWiki * No need to set up ftp accounts etc.
Disadvantages: * User needs a place to store files temporarily online (shouldn't be too hard these days) * People might copy stuff from anywhere on the web (they can do that already, but only for small files ;-)) We might want to restrict this in some creative way; at least we could dynamically set the size limit (20 MB for newbies, 1GB for admins;-)
I'd volunteer to implement the above; sounds like just a few lines of code (with a simple hard limit, say, 100MB for everyone).
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?
Rely on others to store our valueable, multi-GB open content pr0n^W music files? Never! :-)
Magnus