Topic: Can only browse in firefox, Init event OK but no browse binding?

I've been trying to solve this problem by searching the forum but had little luck.

This works perfectly in Firefox but fails with no error in Safari 5.1.1 and Chrome 15.0.874:

{
"runtimes":"gears,html5,flash,silverlight,browserplus",
"browse_button":"avatarUploadLauncher",
"container":"uploadContainer",
"max_file_size":"10mb",
"url":"/assets/upload.json",
"flash_swf_url":"/js/jmvc/libs/plupload/plupload.flash.swf",
"silverlight_xap_url":"/js/jmvc/libs/plupload/plupload.silverlight.xap",
"filters":[{"title":"Image files","extensions":"jpg,gif,png"}],
"multipart_params":{
    "data[SID]":"2mcvmlo5quqmqrbdlskmkn6v93",
    "data[Asset][model]":"User",
    "data[Asset][foreign_key]":"",
    "data[Asset][name]":"avatar"
},
"multipart":false,
"multi_selection":false
}

Compounding the confusion is that my uploaderInstance.bind to the "Init" event works in all these browsers and console.log()s the runtime as "html5".

Summary: successfully initialized with no errors in firefox, safari and chrome, yet file browse is only hooked up in firefox. 

Feel like I must be missing something obvious.

Are multipart_params not allowed when multipart = false?  I realize it is semantically confusing but it appears that plupload appends these multipart_params to the url when in stream/chunk mode.  Originally I thought my problem was that I was in multipart mode -- alas, when switching to stream mode I still had the same problem: no browsing for files in chrome and safari.

Thanks to the contributors and members of this forum...I love plupload so far and can't wait to move on from swfupload.  It's been a long time coming.

Re: Can only browse in firefox, Init event OK but no browse binding?

Nothing is jumping out at me.  I would try simplifying your configuration down to the bare minimum until you get something working on each of the browsers, then add back each configuration option one by one until you see which one is causing the problem.  plupload will fail silently with certain types of errors.

Re: Can only browse in firefox, Init event OK but no browse binding?

Thanks mike, I'll try removing some things.  I am binding plupload in a jmvc widget and thought that might be contributing to the problem; though, I compared the "Example/Custom Upload" browser click event to mine (in safari) and it's identical:

Click event on my a#avatarUploadLauncher:

isAttribute: false
listenerBody: "function (y) {k.getElementById(v.id+"_html5").click();y.preventDefault();}"
node: HTMLAnchorElement
type: "click"
useCapture: false

Click event on Example/Custom Upload a#pickfiles:

isAttribute: false
listenerBody: "function (y) {k.getElementById(v.id+"_html5").click();y.preventDefault();}"
node: HTMLAnchorElement
type: "click"
useCapture: false

The only other events bound to my file browse link are jmvc "destroyed" events.  I can't imagine this would interfere with webkit and not firefox.

Re: Can only browse in firefox, Init event OK but no browse binding?

Mike, thanks again!  I should've posted my html.  I didn't realize that browse_button needed to be inside of container.  I'm surprised it worked at all in firefox.  All works...this is great.

Re: Can only browse in firefox, Init event OK but no browse binding?

Hi guys!

I think I have a similar problem, but only in Opera, everything else is working fine.
@apson, what was the solution to your problem?

Thanks!

Re: Can only browse in firefox, Init event OK but no browse binding?

@marcell the solution was just to make sure that "container" contained "browse_button"

Otherwise the polyfill (or "shim") was way out of position.  So:

"browse_button":"uploadLaunchButton",
"container":"uploadContainer", <-- uploadLaunchButton should be inside this.

I'm guessing we had different issues as I had problems in Safari and Chrome.  I haven't tested in Opera, yet.

Good luck.

Re: Can only browse in firefox, Init event OK but no browse binding?

Meanwhile I found the solution and that was it smile

Thanks anyway!