开发者

How to upload files using Yahoo uploader widget in asp.net

Many might have had experience using File Upload widget from Yahoo User Interface library. The docs and community all know how to receive the files on the server using another server technology other than ASP.NET. If anyone has indeed used the widget in their asp.net pages could you share the code on

  1. How to receive the uploaded files Stream/Bytes to a file.

  2. How to check Integrity of开发者_JAVA技巧 the File

  3. How to check if file was received correctly.

Also i would love to do it in single page because doing so i would learn how to differentiate between a normal webpage request and the one caused my file upload widget

Yahoo Upload Widget can be Found here: https://developer.yahoo.com/yui/uploader/.


Have you tried looking at postedfiles collection though? The API looks like it does a standard post. If it does, the just use that collection.

If it doesn't, then you need to use the inputstream property on the request object to read the incoming bytes.

Using something like Fiddler or firebug will tell you how it's making the request. Look for the request type being multipart/mime

edit Checking the file integrity & whether it was uploaded correctly are pretty much impossible. The only way I can think to do it is to have the user generate a hash of the file then upload the file & the hash & you check the hash is valid. ie not really practical.

All you're getting is a stream of bytes. you have to assume when the stream ends, it ended cleanly & you got all the file.


I answered my own question with code over here.

http://labs.deeptechtons.com/asp-net-tuts/how-to-upload-files-asynchronously-using-yahoo-uploader/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜