no chunking possible on safari #589

Closed
john-dev opened this Issue Jul 10, 2012 · 9 comments

Comments

Projects
None yet
5 participants
@john-dev

Hello,

i am using pluploader with the following settings, working fine on ie,ff but not on safari since i get a bad response when using chunk uploading:

var uploader = new plupload.Uploader({
    runtimes : 'html5,flash,html4',
    url : '***.php?pid='+get_GET_param("pid")+'&vrf='+get_GET_param("vrf"),
    container : 'pluploader',
    browse_button : 'pluploader_addfiles',
    drop_element: 'pluploader_dropzone',
    max_file_size : '100000mb',
    chunk_size : '5mb',
    unique_names : false,
    flash_swf_url : '/swf/plupload.flash.swf',
preinit: attachError, 
setup: attachCallbacks,

when uploading a file smaller than my 5mb chunking like 1mb, everything works fine
-> {"jsonrpc" : "2.0", "result" : null, "id" : "id"}
if the file is bigger then 5mb, the response is bad
-> {"jsonrpc" : "2.0", "error" : {"code": 103, "message": "Failed to move uploaded file."}, "id" : "id"}

i read a lot about this but couldnt find a solution in those posts.
Flash works fine but it's not what i would like to use.

it's not a php problem since it is working with any other browser..

Thanks in advanced,
John

@john-dev

This comment has been minimized.

Show comment Hide comment
@john-dev

john-dev Jul 10, 2012

ok, maybe it's a problem with large files, not just with chunking.
$_FILES with small files:
array(1) {
["file"]=>
array(5) {
["name"]=>
string(13) "Jellyfish.jpg"
["type"]=>
string(10) "image/jpeg"
["tmp_name"]=>
string(14) "/tmp/phpZnNAN0"
["error"]=>
int(0)
["size"]=>
int(775702)
}
}

$_FILES with large files (like 8mb):
array(0) {
}

ok, maybe it's a problem with large files, not just with chunking.
$_FILES with small files:
array(1) {
["file"]=>
array(5) {
["name"]=>
string(13) "Jellyfish.jpg"
["type"]=>
string(10) "image/jpeg"
["tmp_name"]=>
string(14) "/tmp/phpZnNAN0"
["error"]=>
int(0)
["size"]=>
int(775702)
}
}

$_FILES with large files (like 8mb):
array(0) {
}

@john-dev

This comment has been minimized.

Show comment Hide comment
@john-dev

john-dev Jul 10, 2012

skipped back to multipart : false using phps std input stream for now.. not realy a nice solution

skipped back to multipart : false using phps std input stream for now.. not realy a nice solution

@daparky

This comment has been minimized.

Show comment Hide comment
@daparky

daparky Jul 24, 2012

i've tried it in Safari 5.1.7 and works fine on large files. I tried a 9mb file and and a small 1mb file and it worked. Could it be a memory issue on your server?

daparky commented Jul 24, 2012

i've tried it in Safari 5.1.7 and works fine on large files. I tried a 9mb file and and a small 1mb file and it worked. Could it be a memory issue on your server?

@jayarjo

This comment has been minimized.

Show comment Hide comment
@jayarjo

jayarjo Jul 27, 2012

Owner

@john-dev, in what version of Safari you get that problem?

Owner

jayarjo commented Jul 27, 2012

@john-dev, in what version of Safari you get that problem?

@john-dev

This comment has been minimized.

Show comment Hide comment
@john-dev

john-dev Aug 10, 2012

The problem occurs using Safari v5.1.3 on osx 10.7.3

The problem occurs using Safari v5.1.3 on osx 10.7.3

@odinho

This comment has been minimized.

Show comment Hide comment
@odinho

odinho Oct 5, 2012

Please check whether the issue is fixed with applying patch in #629

odinho commented Oct 5, 2012

Please check whether the issue is fixed with applying patch in #629

@laimu

This comment has been minimized.

Show comment Hide comment
@laimu

laimu Jan 9, 2013

I test with safari 5.1.7 and chinking doesn't work.

laimu commented Jan 9, 2013

I test with safari 5.1.7 and chinking doesn't work.

@jayarjo

This comment has been minimized.

Show comment Hide comment
@jayarjo

jayarjo Jan 27, 2013

Owner

Yes, chunking doesn't work in Safari 5.x, but it should be able to upload the file anyway. @laimu does it in your case, or it fails?

Owner

jayarjo commented Jan 27, 2013

Yes, chunking doesn't work in Safari 5.x, but it should be able to upload the file anyway. @laimu does it in your case, or it fails?

@jayarjo

This comment has been minimized.

Show comment Hide comment
@jayarjo

jayarjo Jan 27, 2013

Owner

@john-dev it might be that your server has a limit on file size that you can upload (by default it is set to 2mb I think), so when you use chunks (in Chrome and Firefox), file manages to make it's way to the destination folder piece by piece (not exceeding the limit that is). But Safari 5.x is not able to slice the file to chunks and upload fails. You can force chunking in Safari 5.x by explicitly asking Plupload to choose a runtime with chunking support, like this:

...
runtimes: 'html5,flash,silverlight',
browse_button: 'uploader',
container: 'container',
required_features: 'chunks' // <- this line is crucial
...
Owner

jayarjo commented Jan 27, 2013

@john-dev it might be that your server has a limit on file size that you can upload (by default it is set to 2mb I think), so when you use chunks (in Chrome and Firefox), file manages to make it's way to the destination folder piece by piece (not exceeding the limit that is). But Safari 5.x is not able to slice the file to chunks and upload fails. You can force chunking in Safari 5.x by explicitly asking Plupload to choose a runtime with chunking support, like this:

...
runtimes: 'html5,flash,silverlight',
browse_button: 'uploader',
container: 'container',
required_features: 'chunks' // <- this line is crucial
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment