开发者

flex lowercase to uppercase issue

开发者 https://www.devze.com 2023-04-01 19:27 出处:网络
I got one problem. I called one image from server. example: \"www.sample.com/images/image1.jpg\" But if someone changed the name to uppercase like IMAGE1.jp开发者_C百科g. Flex doesn\'t display image.

I got one problem. I called one image from server. example: "www.sample.com/images/image1.jpg" But if someone changed the name to uppercase like IMAGE1.jp开发者_C百科g. Flex doesn't display image.

solution plz?


One solution is to use a web server that does not requre case sensitive paths, like Microsoft's Internet Information Services.

Another option is to limit access to your server so that people cannot change the names of files.


If you've got only two possible spelling for each name ("image1.jpg" and "IMAGE1.jpg") you can apply a dirty hack. Listen to Image's error events (ioError and securityError) and after one fail try to load image by another path.

0

精彩评论

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