我应该使用哪种类来进行文件上传,从SYSTEM.IO名称空间下载 [英] WHICH CLASSES SHOULD I USE FOR FILE UPLOADING,DOWNLOADING FROM SYSTEM.IO NAMESPACE

查看:47
本文介绍了我应该使用哪种类来进行文件上传,从SYSTEM.IO名称空间下载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨!

我目前正在为我的网站进行文件相关的操作....而且我对SYSTEM.IO NAMESPACE有点困惑.....

我需要提供一些与文件相关的基本功能,如下所示.
正在上传.....

大小限制应为-100mb(最大)

文件类型:.pdf,.doc,.txt(以可以进一步更改的方式提供)

上传文件时要收集的信息...(此数据将保存到数据库中)

****下面是要与文件一起提取的详细信息*******
*文件名称
*大小
*文件类型
*由(用户名...)
上传 *发布者名称
*姓氏
*要保存到数据库的书的缩略图....
*已保存文件的链接...(上载的文件将保存在文件服务器上,但是,如何将该链接保存到数据库?)

提供创建txt注释的选项

用户可以使用FLEXPAPER在文档查看器中查看这些上传的文件,并可以下载这些文档...


有人可以给我提供我需要的类列表...上述操作.....

我从未进行过文件相关的操作''....

请指导我它非常重要.....

感谢ADVANCE .....;)

hi!!

i am currently in file related operation for my website.... and i am little confused with SYSTEM.IO NAMESPACE.....

i need to provide some basic file related function they are as follows.....

uploading.....

SIZE LIMIT should be- 100mb (max)

file type: .pdf, .doc, .txt (provide in such a way where it can be changed in further)

info to be collected while uploading the file...(this data would be saved into database)

****below is the details to be extracted with the file*******
*name of the document
*size
*Filetype
*uploaded by(username...)
*publisher name
*Aurthor name
*the thumbnail of the book to be saved into database....
*link of the file saved... (the uploaded file would be saved on the file server but,how to save that link to the database??)

Providing an option to create txt notes

users can View These Uploaded files in document viewer using FLEXPAPER, and CAN DOWNLOAD THESE DOCUMENTS......


can someone please Provide me the list of classes which i would be needing... for the above operations.....

I HAVE NEVER DONE FILE RELAED OPERATION''S....

PLEASE DO GUIDE ME IT''s VERY IMPORANT.....

THANK''s in ADVANCE..... ;)

推荐答案



要在ASP.net中上传文件,请参考 [
Hi,

to uploading Files in ASP.net refer this[^]
it will help u a lot
Best Luck
Happy Coding:)


检查这些链接:

http://www.intstrings .com/ramivemula/asp-net/save-files-to-a-table-in-database-using-fileupload-control/ [ http://msdn.microsoft.com/en-us/library/aa478985.aspx [ ^ ]
Check these links :

http://www.intstrings.com/ramivemula/asp-net/save-files-to-a-table-in-database-using-fileupload-control/[^]


http://msdn.microsoft.com/en-us/library/aa478985.aspx[^]


我不知道任何用于文件上传的类,您必须为此编写自己的代码.

默认的上传大小约为4兆,因此您必须编辑Web服务器元数据以增加大小.

1.检查是否未选择文件
如果为IsNothing(fu_ProductEditor_Basic_AdditionalImage1.PostedFile)然后
2.检查内容长度
如果fu_ProductEditor_Basic_AdditionalImage1.PostedFile.ContentLength = 0那么
3.获取文件名
TheFileName = fu_ProductEditor_Basic_AdditionalImage1.PostedFile.FileName
4.确保它是http:
的有效文件名 TheFileName = Regex.Replace(TheFileName,"[(?*"",, \\<> ~~%{} + _ @:\/!; {}] +","_")
6.将文件保存到磁盘驱动器
fu_ProductEditor_Basic_AdditionalImage1.PostedFile.SaveAs(TheLibraryPath&"\"& TheFileName)
7.做你的数据库资料


I don''t know of any classes for file upload, you have to write your own code for that.

The default upload size is around 4 megs, so you have to edit the webserver metadata to increase the size.

1. Check for no file selected
If IsNothing(fu_ProductEditor_Basic_AdditionalImage1.PostedFile) Then
2. Check content length
If fu_ProductEditor_Basic_AdditionalImage1.PostedFile.ContentLength = 0 Then
3. Get file name
TheFileName = fu_ProductEditor_Basic_AdditionalImage1.PostedFile.FileName
4. Make sure it''s a valid file name for http:
TheFileName = Regex.Replace(TheFileName, "[(?*"",\\<>�~%{}+_@:\/!;{}]+", "_")
6. Save the file to the disk drive
fu_ProductEditor_Basic_AdditionalImage1.PostedFile.SaveAs(TheLibraryPath & "\" & TheFileName)
7. Do your database stuff


成员7849477写道:
Member 7849477 wrote:

*已保存文件的链接...

*link of the file saved...



您必须计算链接



You have to calculate the link

TheLibraryPath = Products.GetCurrentPath() & "Product\images\Library"
TheLibraryVirtualPath = "~/Product/images/Library"







您的问题太大了,我无法在短时间内回答,所以我只是为您提供部分答案.







Your question is far too large for me to answer in a short amount of time, So I''m just giving you part of the answer.


这篇关于我应该使用哪种类来进行文件上传,从SYSTEM.IO名称空间下载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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