使用 Uploadify 上传图像时遇到本地代理 (proxy.pac) 的 IO 错误
我正在尝试使用 Uploadify 上传图像,但遇到 IO 错误。我有 http://github.com/leeh/uploadify_paperclip_demo 并且它可以在我的计算机上运行,所以我决定逐步将我的应用程序的功能实现到这个示例中以捕获错误,并发现IO错误的原因是我的本地proxy.pac(我使用FF):
function FindProxyForURL(url, host) {
if (shExpMatch(host, "*.app.local*")) {
return "PROXY 127.0.0.1:3000";
}
return "DIRECT";
}
一切正常 http://127.0.0.1:3000/manager/photos 且 http://www.app.local/manager/photos。我尝试关闭 proxy.pac 并使用主机文件(我在 Windows XP 上),Uploadify 与 http://www.app.local:3000/manager/photos。 我不能拒绝处理本地代理,因为我使用子域(Subdomain-fu)并且我还没有准备好将每个子域添加到主机。
有想法吗?任何帮助将不胜感激。
ps:我在 SWFUpload 中遇到了同样的错误。我认为Uploadify在开发中更容易使用。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
据我了解,Flash 会绕过 Firefox 中的代理自动配置文件。我已经使用 Charles Web 调试代理应用程序 来确认它。
但我可以通过在主机文件中添加上传表单的主机来解决这个问题(正如我所说的,我在win xp上):
您应该记住的一件事是将您的请求指向相应的端口号。与 PAC 文件相比,这只是一个烦恼,除非您有很多具有上传功能的表单。
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):
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.