Goal: Upload a picture that shall be saved in the asp.net MVC project created in Visual Studio 2010.
Questions:
Should the pictures be saved in my SQL server express o开发者_C百科r VS 2010's Content/Images and why?
The requirement specifications are:
- The width and height should be max 200 pixels
- The file format should be png, gif and jpeg
- The picture's size is max 1 mb.
What sourcecode do I need?
Can somebody can recommend a good website about the sourcecode of uploading a picture?
Should the pictures be saved in my SQL server express or VS 2010's Content/Images and why?
To answer this question, read this article.
You can find code to upload files in many places.
Adapting it so only files of your specifications will be saved is left as an exercise for the reader.
精彩评论