本文介绍了如何将文件上传到亚马逊S3而不通过服务器传递?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一个前端的解决方案,上传文件到亚马逊S3(也就是说,不通过我的服务器传递。



我找到的解决方案是


它可能会做这个工作,但是它的要求是闪光的,这是项目描述的第一句话:

SWFUpload多年来一直没有得到积极的发展。



这是我期望的功能,虽然他们都不是nessesary




  • 无插件

  • 以Amazon S3为基础构建,处理存储桶认证等。请参阅文件上传进度

  • 来自IE8 +的支持
  • p> kgu87是正确的,几乎解释了整个过程直接将文件上传到S 3

    您也可以查看与此相关的AWS文档:





    如果你我们正在寻找一个支持HTML5直接上传到S3的上传工具,请查看



    他们有一篇很好的文章解释了如何设置:



    文档描述了用于生成策略和s的PHP服务ignature(S3都需要接受你的下载),但你可以使用任何语言来生成。此外,在某些使用情况下,您可以生成一个具有很高到期时间的一次性策略,并将其硬编码到您的上传表单中。


    I'm looking for a front-end solution for uploading files to amazon s3 (that is, not passing them through my server.

    The solution I have found ishttps://code.google.com/p/swfupload/

    It might do the job, but it requier flash and this is the first sentence of the project description is:

    SWFUpload has not been under active development for several years.

    Here are my desired features, though none of them are nessesary

    • No plugins
    • Built with Amazon S3 in mind, handling buckets authentification etc.
    • Some way to see file upload-progress
    • Support from IE8+

    解决方案

    kgu87 is correct, this article pretty much explains the entire process to upload files directly to S3 without passing them trough your own server.

    You can also check out the AWS docs related to this on:

    http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingHTTPPOST.html

    http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPOST.html

    If you're looking for an upload tool that supports HTML5 uploads directly to S3, check out Plupload

    They have a great article that explains how to set it up:

    https://github.com/moxiecode/plupload/wiki/Upload-to-Amazon-S3

    The documentation describes a PHP service that's used to generate a policy and signature (both are required for S3 to accept your download) but you can use any language to generate those. Also, in certain use cases, you can just generate a one-time policy with a very high expiration time and hard code it into your upload form.

    这篇关于如何将文件上传到亚马逊S3而不通过服务器传递?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-30 01:52