Wednesday, March 28, 2012

Saving pictures

Is it better to have users that upload pictures have them saved to SQL server or to a folder? I have a site where users enter things that they own (and each item has a unique id) and now I would like to add the functionality to add a picture. I am sure I should use the fileUpload control, but should this save to a folder created for each user or to the SQL record itself? Or possibly a separate SQL table just for pictures?

Thanks for the help.

Images are stored as BLOB data in SQL Server. So if you want to save the pictures in SQL Server, just send the pics as byte arrays to SQL Server, you can find a lot of examples on the internet. And here is a discussion about to BLOB or not, in this post:

http://forums.asp.net/1357936/ShowPost.aspx

No comments:

Post a Comment