Upload
zinnia
View
38
Download
1
Embed Size (px)
DESCRIPTION
Saving Files to Database. Sams ASP NET 4 Unleashed. Small Files: FileUploadDatabase.aspx. FileUploadDatabase.aspx: F orm. FileUploadDatabase.aspx: Data Control. FileUploadDatabase.aspx: Data Source. Database Table. Reading the Uploaded Files: FileHandler.ashx. - PowerPoint PPT Presentation
Citation preview
Saving Files to Database
Sams ASP NET 4 Unleashed
Small Files: FileUploadDatabase.aspx
FileUploadDatabase.aspx: Form
FileUploadDatabase.aspx: Data Control
FileUploadDatabase.aspx: Data Source
Database Table
Reading the Uploaded Files: FileHandler.ashx
• Use a generic HTTP Handler file
• Connect with
Upload Large Files
• Do extra work when uploading large files• Use less memory• Upload in more manageable chunks• Configure: httpRuntime maxRequestLength and httpRuntime
requestLengthDiskThreshold• maxRequestLength = 4MB• requestLengthDiskThreshold buffer
• 10MB limit, buffer of 100KB in Web.config
FileUploadLarge.aspx
FileUploadLarge.aspx: AddFile
FileUploadLarge.aspx: StoreFile
FileUploadLarge.aspx: Form
FileUploadLarge.aspx: Repeater
FileUploadLarge.aspx: Data Source
FileHandlerLarge.ashx
Problem Set 6
• Modify PS45 and add product upload.