[asp]代码库
if (this.fileUpload.PostedFile != null && this.fileUpload.PostedFile.ContentLength > 0)
//START : Saving File in Database
SaveFile saveFileInDB = new SaveFile();
saveFileInDB.FileName = this.fileUpload.PostedFile.FileName;
saveFileInDB.FileExtension = Path.GetExtension(this.fileUpload.PostedFile.FileName);
saveFileInDB.FileContent = this.fileUpload.FileBytes;
Result Result = saveFileInDB.SaveFileInDB();
if (Result.IsError == false)
{
//File Save in Database Successfully!
}
else
{
//Error in Saving File in Database!
//Error: Result.ErrorMessage
//InnerException: Result.InnerException
//StackTrace: Result.StackTrace
}
//END : Saving File in Database
by: 发表于:2017-10-19 09:41:33 顶(0) | 踩(0) 回复
??
回复评论