Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Save file in database

Author  Topic 

shapper
Constraint Violating Yak Guru

450 Posts

Posted - 2009-07-20 : 12:25:18
Hello,

I am working on an ASP.NET MVC web site and I need to upload files.

I see two options:
1. Save the files on the folder and save the path on the database;
2. Save the file on the database
In this case what should the be type of the file column?
And should I save also the MimeType?
Note: I am using SQL 2008 Express.

What would you advise me to do?

On project that use XML I save the files on a folder.
But in this case, since I have a SQL 2008 database, maybe I should have everything in the database. It would be even easier for backups. I would have only to download the database.

Any advice is welcome.

Thanks,
Miguel

   

- Advertisement -