开发者

Excel upload in flex 3

am trying to upload excel file using filereference however when uploading it is throwing this erro开发者_StackOverflowr

Error #2044: Unhandled IOErrorEvent:. text=Error #2124: Loaded file is an unknown type.

Action script error occured after continue it is uploading the file but why that error is coming?

Thanks


contentLoaderInfo is key

loader.contentLoaderInfo.addeventListener( IOErrorEvent.IO_ERROR , someIOerrorCallBack )


Check out http://scottrockers.com/blog/resources/flash-information/workaround-solution-to-flash-error-2044-unhandled-securityerror-and-error-2048-security-sandbox-violation, but like JAX & Lee said, we need a lot more info. Are you trying to load the excel file from your computer, from a seperate domain, from localhost, from 127.0.0.1? Easiest way is if your trying to load it from a localhost url, that should work. If it's a file on disk, check your security settings http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html and enabled the directory where the file resides. If your loading it from some other domain, you need to take other precautions like a crossdomain.xml on that domain.


Are you using the .load() method of FileReference? If so, don't. Just do the .browse() method and when the selected event is triggered, have FileReference go ahead with the .upload(). The only reason you would need to use .load() is if your Flex client needs to read the bytes.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜