简体   繁体   English

PHP:直接将文件(视频)上传到S3

[英]PHP: upload files (vids) directly to S3

I'm looking for examples (maybe on Github, blog, or elsewhere) that demonstrate how to upload files (videos) directly from a php http post form to AWS S3. 我正在寻找示例(可能在Github,博客或其他地方),以演示如何直接从php http发布表单将文件(视频)上传到AWS S3。 The main requirement is to see the progress of the upload in action and trigger a response when complete (without reloading the page). 主要要求是查看实际的上传进度并在完成时触发响应(无需重新加载页面)。 jQuery File Upload Plugin could be a good solution, do you know of any code examples that do this? jQuery File Upload Plugin可能是一个很好的解决方案,您知道执行此操作的任何代码示例吗? The files (videos) will be up to 1gb in size, so propose a different method if you think this won't work well. 文件(视频)的最大大小为1gb,因此,如果您认为此方法不能很好地工作,请提出另一种方法。

You have checked this out, right? 您已经检查了这个 ,对吗?

Sadly, there's no progress involved by default. 可悲的是,默认情况下不涉及任何进度。 Probably you should do it yourself using AWS serverside API and ajax polling (or websockets), which would add workload for your server, though. 也许您应该自己使用AWS服务器端API和ajax轮询(或websocket)来完成此操作,但这会增加服务器的工作量。

Here is a C# example of how to track the Multipart Upload Progress. 是有关如何跟踪分段上传进度的C#示例。

Otherwise you could go for a client-side approach with the Javascript SDK . 否则,您可以使用Javascript SDK的客户端方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM