如何使用PHP和进度条直接将文件上传到S3 [英] How to upload files directly to S3 using PHP and with progress bar

查看:145
本文介绍了如何使用PHP和进度条直接将文件上传到S3的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一些类似的问题,但都没有在如何使用PHP与进度条直接将文件上传到S3一个很好的答案。它甚至有可能增加一个进度条,不使用Flash技术?

There are some similar questions but none have a good answers in how to upload files directly to S3 using PHP with progress bar. Is it even possible adding a progress bar without using Flash?

注:我指的是从上传客户端浏览器直接到S3。

NOTE: I am referring to uploading from client browser directly to S3.

推荐答案

我在我们的项目中做到了这一点。使用AJAX,因为标准的跨域的安全策略无法直接上传到S3;相反,你需要使用一个普通的表单POST或Flash。您将需要发送的安全策略和签名在一个相对复杂的过程,如 S3文档解释

I've done this in our project. You can't upload directly to S3 using AJAX because of standard cross domain security policies; instead, you need to use either a regular form POST or Flash. You'll need to send the security policy and signature in a relatively complex process, as explained in the S3 docs.

这篇关于如何使用PHP和进度条直接将文件上传到S3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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