views:

18

answers:

1

I am developing a web application to accept a bunch of text and attachments (1 or more) via email, web and other methods.

I am planning to build a single interface, mostly a web service to accept this content.

What design considerations should I make?

I am building the app using ASP.NET MVC 2.

Should the attachments be saved to disk or in the database? Should the unified single interface be a web service? Pros and cons to using web services to upload files

A: 

as with any acceptance of files i'd be checking them for viruses or the like. i'm very nervous about files transmitted from the internet.

i always like putting my files in a database because it's neater i find. i hate having files over the network with folders needing rights etc. i know there are people that prefer it the other way so i guess my answer is also depends on personal preference.

i like the db approach because i can more easily tie files to records and do searches. if you have a file system then you still need to store info about the file plus the extra work of storing it.

then if you need to move files around you also need to possibly modify references in the database.

then again, you need to allocate enough space to grow the database and then cater for multiple databases perhaps as storage runs out.

so i guess if you're downloading large files then yeah maybe i can see the point of a file system as it's easier to grow it. if you have small text files then maybe a database will work.

griegs
I agree with most of your comments. I ended up going with a mixed approach as the files involved can get large in size.