當前位置:首頁 » 文件傳輸 » 項目設計上傳文檔
擴展閱讀
webinf下怎麼引入js 2023-08-31 21:54:13
堡壘機怎麼打開web 2023-08-31 21:54:11

項目設計上傳文檔

發布時間: 2022-10-10 16:31:19

❶ 如何通過WebService批量上傳多個大文件

WinForm 程序開發
WinForm是·Net開發平台中對Windows Form的一種稱謂。新增WinForm程序項目,添加文件上傳服務引用。

3.1. Winform 程序實現效果
程序界面簡單設計為:選擇文件按鈕,選擇文件列表,上傳文件按鈕、上傳信息及上傳進度。

3.2. Winform 上傳文件效果
示例演示:選擇兩大於4MB文件進行上傳,上傳成功。

3.3. 文件上傳關鍵源碼
localhost.WebService mWebService = new WinTest.localhost.WebService();
mWebService.CookieContainer = new System.Net.CookieContainer();
mWebService.Timeout =- 1;

對 XML Web services 的同步調用的超時(以毫秒為單位)。默認為 100000 毫秒。提示:如果將 Timeout 屬性設置為 Timeout =-1,則指示該請求無超時。

❷ 文檔管理系統的設計與實現。jsp實現一個能對文檔進行上傳、下載、分類、統計、維護等功能的系統。

文檔管理系統的設計與實現(源程序+論文+開題報告+答辯稿)
可以幫你做
你可以網路下我的名字
就可以了的

❸ 如何通過WebService批量上傳多個大文件

  • 採用接收位元組的方式開發Web Service,提供是創建還是累加參數,根據參數將文件位元組寫入文件中。示例代碼如下:

❹ 項目文檔管理

會博通綜合文檔管理系統

工程項目文檔管理分類:

一、監理文件材料:

1、監理規劃

2、監理月報中的有關質量問題

3、監理會議紀要中的有關質量問題

4、進度控制

5、質量控制

6、造價控制

7、分包資質

8、監理通知

9、合同與其他事項管理

10、監理工作總結

二、施工文件材料:

土木工程

1、土木工程

①施工技術准備文件

②施工現場准備

③地基處理記錄

④工程圖紙變更記錄

⑤施工材料質量證明及復試試驗報告

⑥施工試驗記錄

⑦隱蔽工程檢查記錄

⑧施工記錄

2、電氣、給排水、消防、採暖、通風、空調、燃氣、建築智能化、電梯工程

①一般施工記錄

②圖紙變更記錄

③設備、產品質量檢查、安裝記錄

④預檢記錄

⑤隱蔽工程檢查記錄

⑥施工試驗記錄

⑦質量事故處理記錄

⑧工程質量檢驗記錄

三、竣工驗收文件材料:

1、工程竣工總結

①工程概況表

②工程竣工總結

2、竣工驗收記錄

(1)建築安裝工程

①單位(子單位)工程質量驗收記錄

②竣工驗收證明書

③竣工驗收報告

④竣工驗收備案表(包括各專項驗收認可文件)

⑤工程質量保修書

(2)市政基礎設施工程

①單位工程質量評定表及報驗單

②竣工驗收證明書

③竣工驗收報告

④竣工驗收備案表(包括各專項驗收認可文件)

⑤工程質量保修書

四、竣工圖:

1、綜合竣工圖

①綜合圖

②室外專業圖

2、專業竣工圖

①建築竣工圖

②結構竣工圖

③裝修(裝飾)工程竣工圖

④電氣工程(智能化工程)竣工圖

⑤給排水工程(消防工程)竣工圖

⑥採暖通風空調工程竣工圖

⑦燃氣工程竣工圖

五、工程竣工結算文件材料:

施工單位決算書、監理單位初審書、跟蹤審計初審書、審計部門審定書以及工程竣工結算的全部資料。

六、甲供材文件材料:

甲供材招標、議標、投標文件、合同文件、招標評標記錄文件。

七、在建工程月報表統計文件材料

在建工程月報表統計工作由項目負責人在每月28日之前將各工程月報表報至檔案員,報表內容包括工程形象進度、當月完成產值,並附工作量計算書。

八、在工程建設中使用計算機、數碼相機、數碼攝像機等現代技術手段形成的文件材料(電子文件)。

❺ 求ASP.NET WEB項目文件夾上傳下載解決方案

ASP.NET上傳文件用FileUpLoad就可以,但是對文件夾的操作卻不能用FileUpLoad來實現。

下面這個示例便是使用ASP.NET來實現上傳文件夾並對文件夾進行壓縮以及解壓。

ASP.NET頁面設計:TextBox和Button按鈕。

TextBox中需要自己受到輸入文件夾的路徑(包含文件夾),通過Button實現選擇文件夾的問題還沒有解決,暫時只能手動輸入。

兩種方法:生成rar和zip。

1.生成rar

using Microsoft.Win32;

using System.Diagnostics;

protected void Button1Click(object sender, EventArgs e)

{

RAR(@"E:95413594531GIS", "tmptest", @"E:95413594531");

}

///

///壓縮文件

///

///需要壓縮的文件夾或者單個文件

///生成壓縮文件的文件名

///生成壓縮文件保存路徑

///

protected bool RAR(string DFilePath, string DRARName,string DRARPath)

{

String therar;

RegistryKey theReg;

Object theObj;

String theInfo;

ProcessStartInfo theStartInfo;

Process theProcess;

try

{

theReg = Registry.ClassesRoot.OpenSubKey(@"ApplicationsWinRAR.exeShellOpenCommand"); //註:未在注冊表的根路徑找到此路徑

theObj = theReg.GetValue("");

therar = theObj.ToString();

theReg.Close();

therar = therar.Substring(1, therar.Length - 7);

theInfo = " a" + " " + DRARName + "" + DFilePath +" -ep1"; //命令 + 壓縮後文件名 + 被壓縮的文件或者路徑

theStartInfo = new ProcessStartInfo();

theStartInfo.FileName = therar;

theStartInfo.Arguments = theInfo;

theStartInfo.WindowStyle = ProcessWindowStyle.Hidden;

theStartInfo.WorkingDirectory = DRARPath ; //RaR文件的存放目錄。

theProcess = new Process();

theProcess.StartInfo = theStartInfo;

theProcess.Start();

theProcess.WaitForExit();

theProcess.Close();

return true;

}

catch (Exception ex)

{

return false;

}

}

///

///解壓縮到指定文件夾

///

///壓縮文件存在的目錄

///壓縮文件名稱

///解壓到文件夾

///

protected bool UnRAR(string RARFilePath,string RARFileName,string UnRARFilePath)

{

//解壓縮

String therar;

RegistryKey theReg;

Object theObj;

String theInfo;

ProcessStartInfo theStartInfo;

Process theProcess;

try

{

theReg = Registry.ClassesRoot.OpenSubKey(@"ApplicationsWinRar.exeShellOpenCommand");

theObj = theReg.GetValue("");

therar = theObj.ToString();

theReg.Close();

therar = therar.Substring(1, therar.Length - 7);

theInfo = @" X " + " " + RARFilePath + RARFileName + " " + UnRARFilePath;

theStartInfo = new ProcessStartInfo();

theStartInfo.FileName = therar;

theStartInfo.Arguments = theInfo;

theStartInfo.WindowStyle = ProcessWindowStyle.Hidden;

theProcess = new Process();

theProcess.StartInfo = theStartInfo;

theProcess.Start();

return true;

}

catch (Exception ex)

{

return false;

}

}

註:這種方法在在電腦注冊表中未找到應有的路徑,未實現,僅供參考。

2.生成zip

通過調用類庫ICSharpCode.SharpZipLib.dll

該類庫可以從網上下載。也可以從本鏈接下載:SharpZipLib_0860_Bin.zip

增加兩個類:Zip.cs和UnZip.cs

(1)Zip.cs

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.IO;

using System.Collections;

using ICSharpCode.SharpZipLib.Checksums;

using ICSharpCode.SharpZipLib.Zip;

namespace UpLoad

{

/// <summary>

///功能:壓縮文件

/// creator chaodongwang 2009-11-11

/// </summary>

public class Zip

{

/// <summary>

///壓縮單個文件

/// </summary>

/// <param name="FileToZip">被壓縮的文件名稱(包含文件路徑)</param>

/// <param name="ZipedFile">壓縮後的文件名稱(包含文件路徑)</param>

/// <param name="CompressionLevel">壓縮率0(無壓縮)-9(壓縮率最高)</param>

/// <param name="BlockSize">緩存大小</param>

public void ZipFile(string FileToZip, string ZipedFile, int CompressionLevel)

{

//如果文件沒有找到,則報錯

if (!System.IO.File.Exists(FileToZip))

{

throw new System.IO.FileNotFoundException("文件:" + FileToZip + "沒有找到!");

}

if (ZipedFile == string.Empty)

{

ZipedFile = Path.GetFileNameWithoutExtension(FileToZip) + ".zip";

}

if (Path.GetExtension(ZipedFile) != ".zip")

{

ZipedFile = ZipedFile + ".zip";

}

////如果指定位置目錄不存在,創建該目錄

//string zipedDir = ZipedFile.Substring(0,ZipedFile.LastIndexOf("\"));

//if (!Directory.Exists(zipedDir))

//Directory.CreateDirectory(zipedDir);

//被壓縮文件名稱

string filename = FileToZip.Substring(FileToZip.LastIndexOf('\') + 1);

System.IO.FileStream StreamToZip = new System.IO.FileStream(FileToZip, System.IO.FileMode.Open, System.IO.FileAccess.Read);

System.IO.FileStream ZipFile = System.IO.File.Create(ZipedFile);

ZipOutputStream ZipStream = new ZipOutputStream(ZipFile);

ZipEntry ZipEntry = new ZipEntry(filename);

ZipStream.PutNextEntry(ZipEntry);

ZipStream.SetLevel(CompressionLevel);

byte[] buffer = new byte[2048];

System.Int32 size = StreamToZip.Read(buffer, 0, buffer.Length);

ZipStream.Write(buffer, 0, size);

try

{

while (size < StreamToZip.Length)

{

int sizeRead = StreamToZip.Read(buffer, 0, buffer.Length);

ZipStream.Write(buffer, 0, sizeRead);

size += sizeRead;

}

}

catch (System.Exception ex)

{

throw ex;

}

finally

{

ZipStream.Finish();

ZipStream.Close();

StreamToZip.Close();

}

}

/// <summary>

///壓縮文件夾的方法

/// </summary>

public void ZipDir(string DirToZip, string ZipedFile, int CompressionLevel)

{

//壓縮文件為空時默認與壓縮文件夾同一級目錄

if (ZipedFile == string.Empty)

{

ZipedFile = DirToZip.Substring(DirToZip.LastIndexOf("\") + 1);

ZipedFile = DirToZip.Substring(0, DirToZip.LastIndexOf("\")) +"\"+ ZipedFile+".zip";

}

if (Path.GetExtension(ZipedFile) != ".zip")

{

ZipedFile = ZipedFile + ".zip";

}

using (ZipOutputStream zipoutputstream = new ZipOutputStream(File.Create(ZipedFile)))

{

zipoutputstream.SetLevel(CompressionLevel);

Crc32 crc = new Crc32();

Hashtable fileList = getAllFies(DirToZip);

foreach (DictionaryEntry item in fileList)

{

FileStream fs = File.OpenRead(item.Key.ToString());

byte[] buffer = new byte[fs.Length];

fs.Read(buffer, 0, buffer.Length);

ZipEntry entry = new ZipEntry(item.Key.ToString().Substring(DirToZip.Length + 1));

entry.DateTime = (DateTime)item.Value;

entry.Size = fs.Length;

fs.Close();

crc.Reset();

crc.Update(buffer);

entry.Crc = crc.Value;

zipoutputstream.PutNextEntry(entry);

zipoutputstream.Write(buffer, 0, buffer.Length);

}

}

}

/// <summary>

///獲取所有文件

/// </summary>

/// <returns></returns>

private Hashtable getAllFies(string dir)

{

Hashtable FilesList = new Hashtable();

DirectoryInfo fileDire = new DirectoryInfo(dir);

if (!fileDire.Exists)

{

throw new System.IO.FileNotFoundException("目錄:" + fileDire.FullName + "沒有找到!");

}

this.getAllDirFiles(fileDire, FilesList);

this.getAllDirsFiles(fileDire.GetDirectories(), FilesList);

return FilesList;

}

/// <summary>

///獲取一個文件夾下的所有文件夾里的文件

/// </summary>

/// <param name="dirs"></param>

/// <param name="filesList"></param>

private void getAllDirsFiles(DirectoryInfo[] dirs, Hashtable filesList)

{

foreach (DirectoryInfo dir in dirs)

{

foreach (FileInfo file in dir.GetFiles("*.*"))

{

filesList.Add(file.FullName, file.LastWriteTime);

}

this.getAllDirsFiles(dir.GetDirectories(), filesList);

}

}

/// <summary>

///獲取一個文件夾下的文件

/// </summary>

/// <param name="strDirName">目錄名稱</param>

/// <param name="filesList">文件列表HastTable</param>

private void getAllDirFiles(DirectoryInfo dir, Hashtable filesList)

{

foreach (FileInfo file in dir.GetFiles("*.*"))

{

filesList.Add(file.FullName, file.LastWriteTime);

}

}

}

}

(2)UnZip.cs

using System.Collections.Generic;

using System.Linq;

using System.Web;

/// <summary>

///解壓文件

/// </summary>

using System;

using System.Text;

using System.Collections;

using System.IO;

using System.Diagnostics;

using System.Runtime.Serialization.Formatters.Binary;

using System.Data;

using ICSharpCode.SharpZipLib.Zip;

using ICSharpCode.SharpZipLib.Zip.Compression;

using ICSharpCode.SharpZipLib.Zip.Compression.Streams;

namespace UpLoad

{

/// <summary>

///功能:解壓文件

/// creator chaodongwang 2009-11-11

/// </summary>

public class UnZipClass

{

/// <summary>

///功能:解壓zip格式的文件。

/// </summary>

/// <param name="zipFilePath">壓縮文件路徑</param>

/// <param name="unZipDir">解壓文件存放路徑,為空時默認與壓縮文件同一級目錄下,跟壓縮文件同名的文件夾</param>

/// <param name="err">出錯信息</param>

/// <returns>解壓是否成功</returns>

public void UnZip(string zipFilePath, string unZipDir)

{

if (zipFilePath == string.Empty)

{

throw new Exception("壓縮文件不能為空!");

}

if (!File.Exists(zipFilePath))

{

throw new System.IO.FileNotFoundException("壓縮文件不存在!");

}

//解壓文件夾為空時默認與壓縮文件同一級目錄下,跟壓縮文件同名的文件夾

if (unZipDir == string.Empty)

unZipDir = zipFilePath.Replace(Path.GetFileName(zipFilePath), Path.GetFileNameWithoutExtension(zipFilePath));

if (!unZipDir.EndsWith("\"))

unZipDir += "\";

if (!Directory.Exists(unZipDir))

Directory.CreateDirectory(unZipDir);

using (ZipInputStream s = new ZipInputStream(File.OpenRead(zipFilePath)))

{

ZipEntry theEntry;

while ((theEntry = s.GetNextEntry()) != null)

{

string directoryName = Path.GetDirectoryName(theEntry.Name);

string fileName = Path.GetFileName(theEntry.Name);

if (directoryName.Length > 0)

{

Directory.CreateDirectory(unZipDir + directoryName);

}

if (!directoryName.EndsWith("\"))

directoryName += "\";

if (fileName != String.Empty)

{

using (FileStream streamWriter = File.Create(unZipDir + theEntry.Name))

{

int size = 2048;

byte[] data = new byte[2048];

while (true)

{

size = s.Read(data, 0, data.Length);

if (size > 0)

{

streamWriter.Write(data, 0, size);

}

else

{

break;

}

}

}

}

}

}

}

}

}

以上這兩個類庫可以直接在程序里新建類庫,然後復制粘貼,直接調用即可。

主程序代碼如下所示:

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.UI;

using System.Web.UI.WebControls;

using System.Drawing;

using Microsoft.Win32;

using System.Diagnostics;

namespace UpLoad

{

public partial class UpLoadForm : System.Web.UI.Page

{

protected void Page_Load(object sender, EventArgs e)

{

}

protected void Button1_Click(object sender, EventArgs e)

{

if (TextBox1.Text == "") //如果輸入為空,則彈出提示

{

this.Response.Write("<script>alert('輸入為空,請重新輸入!');window.opener.location.href=window.opener.location.href;</script>");

}

else

{

//壓縮文件夾

string zipPath = TextBox1.Text.Trim(); //獲取將要壓縮的路徑(包括文件夾)

string zipedPath = @"c: emp"; //壓縮文件夾的路徑(包括文件夾)

Zip Zc = new Zip();

Zc.ZipDir(zipPath, zipedPath, 6);

this.Response.Write("<script>alert('壓縮成功!');window.opener.location.href=window.opener.location.href;</script>");

//解壓文件夾

UnZipClass unZip = new UnZipClass();

unZip.UnZip(zipedPath+ ".zip", @"c: emp"); //要解壓文件夾的路徑(包括文件名)和解壓路徑(temp文件夾下的文件就是輸入路徑文件夾下的文件)

this.Response.Write("<script>alert('解壓成功!');window.opener.location.href=window.opener.location.href;</script>");

}

}

}

}

本方法經過測試,均已實現。

另外,附上另外一種上傳文件方法,經測試已實現,參考鏈接:http://blog.ncmem.com/wordpress/2019/11/20/net%e4%b8%8a%e4%bc%a0%e5%a4%a7%e6%96%87%e4%bb%b6%e7%9a%84%e8%a7%a3%e5%86%b3%e6%96%b9%e6%a1%88/

❻ java表單提交裡面的文件上傳,用同步的方式好還是用非同步的好啊

你好,很高興回答你的問題。
這里做成非同步比較好。如果同步的話,遇到文件大的話,表單提交會很慢,體驗非常不好。
如果有幫助到你,請點擊採納。

❼ 請教一套完整的項目設計流程和相關文檔

我已經發到你的郵箱去了,你看下,如果還有什麼疑問就扣我!352870039

❽ 本人在做設計,用的是JSP技術,要將一些文檔上傳到網路上的一個指定的地方,並且可以下載下來,怎樣做

看你的描述,你應該是不懂技術的,所以就不給你說原理啦。

建議去網上搜個現成的例子來用吧,這個系統網上有很多。

你可以這么搜:」jsp 文件上傳 源碼「