开发者

Pass variables after form submitted

I have a post form that calls Amazon's S3 service. I am doing a direct from browser upload to amazon, and thus have to pass some additional information to Amazon, that I will not know until the file is uploaded (file-type, name, 'signature' which references both). h开发者_如何学Cttp://aws.amazon.com/articles/1434

It is a large video file, which I don't want to upload to my server first, which (to the best of my knowledge) rules out using urllib2.open(...) to pass the additional variables to amazon as a POST request. I've been working at it for a couple days now, and haven't had any success with it. What would be the best way to do this?

Note: I will probably be using the uploadify plugin to upload the file. Thank you.


You're probably looking for Query String Request Authentication Alternative.

You can authenticate certain types of requests by passing the required information as query-string parameters instead of using the Authorization HTTP header. This is useful for enabling direct third-party browser access to your private Amazon S3 data, without proxying the request. The idea is to construct a "pre-signed" request and encode it as a URL that an end-user's browser can retrieve. Additionally, you can limit a pre-signed request by specifying an expiration time.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜