My new C #. In the 3.5 ASP website, the user is likely to upload a photo.
What is the best solution to save this picture? Should I save it to a folder on my server and save the path to the database, or should I save the image in the database?
PRO files:
- To serve a file on the feedback stream There is a simple call to just set up ContentType properly, call it, and you've done it.
- Its more demonstrative (though it is often exaggerated, good use of blobs or SQLServer filestreams is pretty good, but still it is lost compared to file operations). Pro DB:
- Compatibility is easy, you can not be in a situation where the file structure and database do not match.
- If you go to a web-form solution with more than one webserver (above a certain amount of success), file-based solutions are difficult.
- Data transfer modifications are usually easy for you to go anywhere, moving DB data anywhere, so once you have solved it you can solve it for images too. Have done
- The manipulation code is easy to write.
- It is easy to report on the entire collection of images.
Comments
Post a Comment