Can you use Amazon S3 via Flex?

前端 未结 3 761
梦谈多话
梦谈多话 2020-12-29 13:51

Due to the lack of clientaccesspolicy.xml, there appears to be problems with using Amazon S3 via Flex. Are there any work arounds?

Edit: Both of the

相关标签:
3条回答
  • 2020-12-29 14:21

    If you're looking for a working Rails - Flex - S3 example then have a look at this rails project: http://github.com/GreenAsJade/s3-swf-upload-plugin

    Its documented and works out of the box. You can even reverse engineer the Flex logic.

    0 讨论(0)
  • 2020-12-29 14:26

    You can CNAME a subdomain you control at Amazon S3 (to a bucket with the name of the subdomain), like so:

    http://s3.ceejayoz.com/ (goes to my 's3.ceejayoz.com' bucket)

    Uploading your own clientaccesspolicy.xml file to the root of that bucket (and setting the permissions to be globally viewable) should do the trick, if I'm understanding your question correctly, as it will be accessible at http://s3.ceejayoz.com/clientaccesspolicy.xml.

    More information in the S3 docs: http://docs.amazonwebservices.com/AmazonS3/2006-03-01/index.html?VirtualHosting.html

    edit: From looking at that, you could also use the "Example Virtual Hosted Style Method" without a CNAME: http://bucketname.s3.amazonaws.com/clientaccesspolicy.xml

    0 讨论(0)
  • 2020-12-29 14:28

    Yes. You can find an ActionScript 3 library for connecting to S3 at:

    http://code.google.com/p/as3awss3lib/

    with more information at:

    http://weblogs.macromedia.com/cantrell/archives/2007/05/actionscript_li.html

    You can look at an example of the API in use by checking out the S3E AIR app at:

    http://download.macromedia.com/pub/developer/air/sample_apps/S3E.air

    and you can grab the source code from:

    http://download.macromedia.com/pub/developer/air/sample_apps/S3E.zip

    hope that helps...

    mike chambers

    0 讨论(0)
提交回复
热议问题