开发者

How should i browse an image file and save at server in asp.net

I have one requirement from client where they want to browse and save their choice Logo image in a website which i am developing.

Really i don't know how it happens and Is there any issue like security i need to consider while implementing this logic?

Please help me开发者_如何转开发 to solve

  1. How user (client) will browse image file and where should i store that file in server?

  2. Every indivisual user can browse file of different size and different name; how can i manage at server side so that image appear at right place and in right manner?

  3. Where should i store image corresponding to user id at server; i.e. in database or file?

  4. Is there any security issue/ folder rights when saving file at server?

Please help?


asp.net has a built in file upload control.. that should be all you need

http://msdn.microsoft.com/en-us/library/aa479405.aspx
https://web.archive.org/web/20211020140211/https://www.4guysfromrolla.com/webtech/091201-1.shtml
http://ondotnet.com/pub/a/dotnet/2002/04/01/asp.html

There are also some awesome Third Party controls that have far more power... I happen to like the RadUpload

  1. This is all dealt with the built in controls
  2. Not sure what you're asking in question 2
  3. If images are user specific, then you should store them in some unique file (I personally prefer using the UniqueIdentifier of the UserID in the Membership Provider... It's harder to "crack" than an ID number (depending on how hidden these image need to be)... you could also store in the database if you need to keep the images completely away from the application so that they cannot be accessed outside of you application.
  4. the application needs to have write permissions to the folder that your storing the images in if you choose to store in a folder instead of the database.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜