none
如何在Blob访问域名的根目录下添加一个crossdomain.xml的文件? RRS feed

  • 问题

  • 大家好,我司使用了Azure的存储服务,我们创建了一个存储账户myaccount,存储视频文件是创建了一个叫myvideos的容器,那么多我上传一个myvideo.mp4文件时,可通过http://myaccount.blob.core.chinacloudapi.cn/myvideos/myvideo.mp4的URL来访问此视频文件。现在我想解决一个FLASH播放器读取跨域视频信息的问题,即需要增加一个http://myaccount.blob.core.chinacloudapi.cn/crossdomain.xml的文件,请问各位如何才能实现?把crossdomain.xml文件放到http://myaccount.blob.core.chinacloudapi.cn/的根目录下,谢谢。
    2013年9月27日 1:46

答案

  • hi,

    如果你只是将文件存在blob上的话,那你不需要使用到这个跨域文件。但是如果你想从blob上读取你的视频文件并通过flash播放的话,你需要在你的flash中用代码加上这个域的信息,也可你在你的flash播放器的所在的项目文件的根目录上加上这个domai。xml的文件。


    Will
    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.


    2013年9月29日 4:02
    版主

全部回复

  • 你好,

    我们可以考虑把crossdomain.xml文件放到项目里面去,如果以这样的形式存储(http://myaccount.blob.core.chinacloudapi.cn/crossdomain.xml )的话只是单纯的存储文件。

    谢谢


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.




    2013年9月27日 8:01
    版主
  • Jambor, 感谢你的回复,但我还不是很明白你的意思,“把corossdomain.xml文件放到项目里面去”是指怎样?我没有把项目部署到Azure上,是使用Java通过REST API往Azure存储Blob的,因此我觉得跟项目应该没什么关系。

    2013年9月28日 8:24
  • crossdomain.xml 是flash为解决文件跨域所引用的xml文件格式,你需要在flash代码中添加信任域名.
    2013年9月28日 15:10
  • hi,

    如果你只是将文件存在blob上的话,那你不需要使用到这个跨域文件。但是如果你想从blob上读取你的视频文件并通过flash播放的话,你需要在你的flash中用代码加上这个域的信息,也可你在你的flash播放器的所在的项目文件的根目录上加上这个domai。xml的文件。


    Will
    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.


    2013年9月29日 4:02
    版主
  • $root container
    2013年10月7日 2:34