使用进度条将文件直接上传到 S3 [英] Upload File Directly to S3 with Progress Bar

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

问题描述

关于这个问题,直接上传文件到来自 ASP.NET 应用程序的 Amazon S3,有没有办法做到这一点并有一个进度条?

Relating to this question, Upload files directly to Amazon S3 from ASP.NET application, is there any way to do this and have a progress bar?

---- 编辑----

---- EDIT ----

两天后,直接方式仍然没有运气.发现一件事看起来很有前途但不是免费的:http://www.flajaxian.com/

Two days later and still no luck with a direct way. Found one thing that looks promising but not free: http://www.flajaxian.com/

使用 flash 通过进度条直接上传到 S3.

Uses flash to upload directly to S3 with a progress bar.

推荐答案

我也在寻找解决方案.也许这会有所帮助,

I'm looking for a solution as well. Maybe this will be of some help,

来自 AWS 开发社区但是在许多语言(PHP、Java)中,对于大文件,你必须使用流通过它的语言环境将占用您大文件的一大块之后(为了填满大量的中央存储器需要 S3 的 http POST 数据用于上传.

From AWS Dev Commnity But in many languages (PHP, Java), for big files, you have to use streams through which the language environment will take chunks of your big file one after the other (in order to fill up central memory with huge amount of data for the http POST of S3 needed for the upload.

流的好处在于他们有一个回调,无论何时下一个块被读取以进一步PUT(在 https 意义上)数据到 S3.您可以使用此回调来计算并在客户端显示进度用户界面.

The nice thing about stream is that they have a callback called whenever the next chunk is read for to further PUT (in the https sense) data to S3. You can use this callback to compute and display the progress on the client UI.

查看libcurl的文档详细说明所有这些是如何工作的.

See the doc of libcurl to see in details how all this works.

<小时>

更新:看起来有两个简单的选项.


Update: It looks like there are two straightforward options.

  1. Flash,通过 FileReference 类
  2. 使用 Java 小程序

我个人讨厌使用第 3 方扩展程序(Flash、Java)来制作应用程序功能,但我还没有找到其他方法.

I personally hate using 3rd party extensions (Flash, Java) to make an app function, but I haven't found another way.

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

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