从AS3上传使用presigned网址S3 [英] Uploading from AS3 to S3 using presigned url

查看:347
本文介绍了从AS3上传使用presigned网址S3的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想直接从闪存到S3上载从闪存图像。请求我需要做似乎需要是,我不认为Flash支持PUT请求。有没有人有闪光灯使用S3 pre-签署的网址工作?曾试图加入的X HTTP的方法,替代似乎没有工作。觉得有可能是插座的方式?

I want to upload an image from flash directly from flash to S3. Request I need to make seems to need to be a PUT request which I don't think flash supports. Has anyone got flash to work with S3 using pre-signed urls? Have tried adding X-HTTP-Method-Override didn't seem to work. Thought there may be a way with sockets?

http://docs.amazonwebservices.com/AmazonS3/latest/dev/UploadObject$p$pSignedURLDotNetSDK.html

http://verveguy.blogspot.co。英国/ 2008/07 /真理约-FLEX-httpservice.html

推荐答案

得到它的工作使用一个名为库的 as3httpclient

Got it working using a library called as3httpclient

https://github.com/gabriel/as3httpclient

包含在源$ C ​​$ C其中的一个测试用例是上传到S3,这么漂亮和容易:)

One of the test cases included in the source code is an upload to S3, so nice and easy :)

https://github.com/gabriel/as3httpclient/ BLOB /主/测试/ S3 / HttpsTest.as

更新:

东西全部工作顺利,直到HTML页面上的一个网络服务器,然后跑进它停止一切工作的问题与沙箱。看来库只能从AIR的作品,而不是HTML页面。最后不得不保存使用POST请求和闪光灯设置的头。闪光code的一个例子是在这里 http://aws.amazon.com/$c $ C / 1092

Things all worked smooth until the html page was on a webserver and then ran into problems with sandboxing which stopped everything working. It seems the library only works from AIR, not from html pages. In the end had to save using a post request and setting headers from flash. An example of flash code is here http://aws.amazon.com/code/1092.

这篇关于从AS3上传使用presigned网址S3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆