views:

1272

answers:

1

I'm trying to upload images with Uploadify but I run into IO error. I have got http://github.com/leeh/uploadify_paperclip_demo and it works on my computer, so I decided to implement functionality of my application to this example step by step to catch the error and discovered that the reason of IO error is my local proxy.pac (I use FF):

function FindProxyForURL(url, host) {
    if (shExpMatch(host, "*.app.local*")) {
        return "PROXY 127.0.0.1:3000";
    }
    return "DIRECT";
}

Everything works fine with http://127.0.0.1:3000/manager/photos and there is IO error with http://www.app.local/manager/photos. I have tried to switch off proxy.pac and use hosts file (I'm on windows xp), Uploadify works with http://www.app.local:3000/manager/photos. I can't refuse to deal with local proxy because I use subdomains (Subdomain-fu) and I'm not ready to add every subdomain to hosts.

Ideas? Any help will be appreciated.

p.s: I've got the same error with SWFUpload. And my opinion that Uploadify is easier to use in development.

A: 

As I figured out Flash bypasses proxy auto configuration file in Firefox. I have used Charles web debugging proxy application to confirm it.

But I could workaround this issue by adding host of upload form in hosts file (as I said I'm on win xp):

127.0.0.1 www.app.com #or whatever host of your upload form

One thing you should remember is to point your requests to corresponding port number. And it is only annoyance comparing with PAC-file unless you have a lot of forms with upload functionality.

Voldy
What a bout on a mac?
Harry
On Ubuntu it's the same as on Win. I think that actually it doesn't depend on OS because it's a Flash feature.
Voldy