Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Storing pdf, word documents and excel documents on database

Status
Not open for further replies.

primagic

IS-IT--Management
Jul 24, 2008
476
GB
I need to create a system where users can logon and download any pdf's, word documents or excel spreadsheets related only to them. I can create the login/authentication side of things but I have been reading articles about the best way to store binary data like pdf's. Should I do it on the SQL database or in the file system.

They also want a public section with a list of all their newsletters (stored as pdf's) that anyone can download. I want to allow the business to upload a newsletter and it displays in the list.

Any suggestions on best practice or links to websites that would show me how to implement this.

Thanks


 
i have designed systems before that create/store/read files on disk. they are a pain to manage if the files are not within the control of IIS. if the files exist within the virtual directory for the website management isn't too bad. if you store the files outside of the IIS virtual directory there are all kinds of security details you need to be aware of.

storing to a db resolves this, but then you have a memory issue. if you are not careful saving & loading multi-mb files can crash the system with OOM errors.

in either case I would use a controller (mvc) or generic handler (webforms [ashx]) to manage file access. this makes it easy to introduce logging and security to the documents.

Jason Meckley
Programmer

faq855-7190
faq732-7259
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top