使用swfupload出现SecurityError Error #2156问题
原来网站是在一个服务器运行是正常的,上传文件也正常。但是当把网站迁移到另外一个服务器时,上传文件就会出现在这个错误:
2156
SecurityError
Error #2156
null
确定后,显示是上传成功,但实际上文件没有上传。
检查了老半天,在网上也问了很多人,都说是目录权限错误,但我检查过后,是没有问题的。
最后在官网上看到如下的解释:
The same application published to server by two site,
one is OK, and other site show the error message, like this:
SWF DEBUG: ReturnUploadStart: Exception occurred: null
SWF DEBUG: Event: uploadError(): Upload Failed. Exception occurred: 2156
SWF DEBUG: SecurityError
SWF DEBUG: Error #2156
SWF DEBUG: null
SWF DEBUG: Event: uploadComplete : Upload cycle complete.
and in the page, the placehoader is white, no appoint image。who can tell me why?Thank you!
sorry, my English is not good!
于是我改了一下网站的端口(原来是95,改为82)
呵呵。居然成功了,个人认为应该是Flash组件对我原来的这个端口不支持吧。
June 5, 2009 - 9:37am
I'm not sure what is triggering your error but here are some guesses:
1) You are uploading to a different domain (or port number) than that which hosts your swfupload.swf file.
2) You are loading swfupload.swf via https (SSL) but are using an HTTP url for your upload url.
If you must upload to a different domain you must place a crossdomain.xml file on your server. See Adobe's live docs for details on setting it up.