Question

I use Uploadify to upload files to my website. Everything works with files that smaller than 4GB. But when I try to upload files that bigger than 4GB - I get this alert: (from client-side) enter image description here

in uploadify.js my fileSizeLimit is set to 0:

fileSizeLimit: 0, // The maximum size of an uploadable file in KB (Accepts units B KB MB GB if string, 0 for no limit)

I tried to increase it, and it's not the problem.

Look at this: (from uploadify.js)

    // Run the default event handler
    if ($.inArray('onSelectError', settings.overrideEvents) < 0) {
        switch(errorCode) {
            case SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED:
                if (settings.queueSizeLimit > errorMsg) {
                    this.queueData.errorMsg += '\nThe number of files selected exceeds the remaining upload limit (' + errorMsg + ').';
                } else {
                    this.queueData.errorMsg += '\nThe number of files selected exceeds the queue size limit (' + settings.queueSizeLimit + ').';
                }
                break;
            case SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT:
                this.queueData.errorMsg += '\nThe file "' + file.name + '" exceeds the size limit (' + settings.fileSizeLimit + ').';
                break;
            case SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE:
                this.queueData.errorMsg += '\nThe file "' + file.name + '" is empty.';
                break;
            case SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT:
                this.queueData.errorMsg += '\nThe file "' + file.name + '" is not an accepted file type (' + settings.fileTypeDesc + ').';
                break;
        }
    }

And the file is not 0 bytes for sure! it's 9.9GB

What is the problem?

Thanks, and sorry for my English

Was it helpful?

Solution

I've been trying to solve this problem and been talking to SWFUpload creator.

The problem is in the flash (it is taking the filesize and sending it to JS), it will not read >4GB file and throw size 0, it is crap piece of crappy software used as spybot full of bugs (J. Roberts words on why did he stop development of SWFUpload) "The Flash development environment has too many bugs. I reported bugs that have existed in Flash 8 that are still not fixed in Flash 11. They turned Flash into a glorified video player and Ad/tracking tool and seem to ignore any other use case.".... nothing helps even compiling it under newer flash versions and rewritting the code, it looks like Flash has some security issue or the bug issue (SWFUpload you have now is compiled under Flash 9, I've recompiled it under Flash 11 and did not help), 64bit and so on... so: give up, you will NOT upload files >4GB via Flash (which relies on browser those are almost all 32bit). HTML5 will be also buggy, the problem is not in php settings, anyway passing >4GB files to the webserver through php is big fault, how I've solved it:

I'm using on my webserver (nginx) upload module so I can upload files up to 20GB [web browsers limitation], which does not go through php so it is secure and stable.

Btw. if I remember correctly it uploaded files <4GB, but the filesize flash seen was just 2147483647 bytes. Use debug mode on SWFUpload, so you can see it :)

OTHER TIPS

I'm wondering if you would consider using a different Upload script? There is no file size limitation for Simple2FTP (http://www.simple2ftp.com) and you can customize the template used - even probably integrate your own scripting to work with the backend db.

I know this script does not require changing any of your server php.ini settings like upload_max_filesize or post_max_size, etc.

Just a though...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top