在C#中的Gmail风格的文件上传 [英] gmail style file upload in c#
问题描述
我需要实现在asp.net C#中的Gmail风格的文件上传
其中,用户会点击按钮和文件对话框打开。
用户选择了一个文件,然后在code文件的过程。
我不希望用户能够看到文件上传控件,他会只需点击一个按钮。
我已经使用了几个解决方案
例
I need to implement Gmail style file upload in asp.net c#
where user will click on button and file dialog will open.
user selects a file,then process that file in code.
i dont want user to see file upload control he ll just click one button.
i have already used few solutions
example
function OpenFileUpload() {
var myFrame = document.getElementById('frameUpload');
$(myFrame).focus();
$(myFrame).contents().find("#FileUpload1").click();
var value = $(myFrame).contents().find("#FileUpload1").val();
if (value != '') {
$(myFrame).contents().find("#btnSubmit").click();
}
}
需要更好的解决方案。
need better solutions.
推荐答案
我不知道,如果你正在谈论的服务器或客户端....
I am not sure if you are talking about the server or client side....
文件上传大文件是它自己的一个=有趣的话题)......尤其是大型文件...
File upload with large files is a interesting topic on it's own =)...especially large files...
在这里找到很好的文章:
<一href=\"http://www.hanselman.com/blog/ABackToBasicsCaseStudyImplementingHTTPFileUploadWithASPNETMVCIncludingTestsAndMocks.aspx\" rel=\"nofollow\">http://www.hanselman.com/blog/ABackToBasicsCaseStudyImplementingHTTPFileUploadWithASPNETMVCIncludingTestsAndMocks.aspx
find good articles here: http://www.hanselman.com/blog/ABackToBasicsCaseStudyImplementingHTTPFileUploadWithASPNETMVCIncludingTestsAndMocks.aspx
的http://weblogs.asp.net/jgalloway/archive/2008/01/08/large-file-uploads-in-asp-net.aspx
http://msdn.microsoft.com/en-us/library/aa479405.aspx
http://weblogs.asp.net/jgalloway/archive/2008/01/08/large-file-uploads-in-asp-net.aspx http://msdn.microsoft.com/en-us/library/aa479405.aspx
但是,为什么不使用一个方便的工具...
But why not use a convenient tool...
下面是好的成分:...
http://www.plupload.com/
Here is good component:... http://www.plupload.com/
心连心
这篇关于在C#中的Gmail风格的文件上传的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!