本文介绍了允许用户使用Ajax下载文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

我要寻找一种方式,让用户使用AJAX我的网站下载文件。之所以我需要做的,这是因为这些文件都相当大(50兆正常)。因此,当用户点击下载按钮,它实际上看起来好像网页没有响应,因为它从我的Amazon S3的流文件给用户。

I am looking for a way to allow users to download a file from my site using ajax. The reason why i need to do this is because the files are quite big (50 megs normally). So when the user clicks the download button it actually looks as if the page is not responding because it has to stream the file from my Amazon S3 to the user.

所以,我需要通知的下载正在进行中,甚至给他们一个进度条的用户。我发现下面的文章,但我没有真正热衷于注射的iFrame到我的网页。

So i need to notify the user that the download is in progress and maybe even give them a progress bar. I have found the following article but i am not really keen on injecting iFrames into my webpage.

在此先感谢您的帮助。

推荐答案

我已经决定使用IFrame的方法是存在的无缝足以令它值得的时间没有别的办法。

I have decided to use the IFrame method is there is no other way that works seamlessly enough to make it worth the time.

这篇关于允许用户使用Ajax下载文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-07 01:34