简历上传文件控制 [英] Resume in upload file control

查看:265
本文介绍了简历上传文件控制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看过以下文章:

  1. <一个href="http://stackoverflow.com/questions/1048330/pause-resume-upload-in-c">http://stackoverflow.com/questions/1048330/pause-resume-upload-in-c
  2. <一个href="http://stackoverflow.com/questions/1830130/resume-uploads-using-http">http://stackoverflow.com/questions/1830130/resume-uploads-using-http

但没有得到一个完美的解决我的问题。

  1. 在上面的帖子,其中一个答案说客户端和服务器需要识别文件中的一些我怎么建议使用GUID,使服务器知道文件追加额外数据了。要求您嘿参观aobve的第一个环节,找到答案。这个答案是所有关于流。有人可以使用PLZ我可以建立这样那样的code提供的链接?

  2. 在这些职位的答案的人说你可以发几个小文件碎片和重建他们的服务器端 ... 如何

  3. 难道我不能像校验等,以检测有多少部分是上传和多少更需要将其追加到该文件?如果是的话,怎么样?

解决方案
  1. 是一个相当基波概念与.NET平台上的文件(因为它是在Java,C和其他语言)。你应该阅读,以及如何使用它们启动。请参阅类MSDN上。

  2. 怎么样?通过使用流式 - 您流份的文件,在小块(使用偏移到文件和组块的大小)。再次,看的文档。

  3. 您可以,但不同的文件校验可以是相同的 - 一个GUID的的相比,校验和碰撞是pretty的小。

I did read the following posts:

  1. http://stackoverflow.com/questions/1048330/pause-resume-upload-in-c
  2. http://stackoverflow.com/questions/1830130/resume-uploads-using-http

But didn't got a perfect solution to my problem.

  1. In the above posts, one of the answers says "client and server needs to identify the file some how i suggest the use of a Guid so the server knows what file to append the extra data too." Request you to plz visit the first link of the aobve and find that answer. This answer is all about streaming. Can someone plz provide links using which I can build such kind of code?

  2. In these posts one of the answer said "you can send several small file pieces and rebuild them server side"...HOW?

  3. Can't I use something like checksum etc to detect how much part is uploaded and how much more needs to be and append it to that file? If yes, how?

解决方案

  1. Streams are a fairly fundemental concept in working with files on the .NET platform (as it is in Java, C and other languages). You should start by reading about them and how to use them. See the Stream class on MSDN.

  2. HOW? By using streaming - you stream parts of the file, in small chunks (using an offset into the file and the size of chunk). Again, see Stream documentation.

  3. You could, but checksums of different files may be the same - with a GUID the chance of a collision is pretty small compared to checksums.

这篇关于简历上传文件控制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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