Click here to Skip to main content
15,900,108 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear Friends

I am developing a website. I need to put the images to a directory and store the image address to the database.

I want to know that how can I secure my image folder so that No one can see any of the image from that folder.
Posted

If you do that, no one will ever be able to see your images, even your own web pages. The browser has to be able to get at the images somehow, and just by that little requirement, it defeats any security system you have.

You're only possiblity is to have a player running on the client side that can request images from a secured URL and the images are sent over to the client encrypted. The player would then decrypt the images and display them. But, this is a bunch of overhead, and very restrictive to how you can use imagery in your web pages, just so someone can't use your images for their own purposes.
 
Share this answer
 
Comments
rashidfarooq 29-Mar-11 11:24am    
Thanks for answering.
So, If I left the images directory as its is, will it be dangerous or risky or not?
Is there any way to make that directory read only.
Dave Kreskowiak 29-Mar-11 13:49pm    
I have no idea what your setup is like, nor do I have any idea what you mean by "risky". If you're thinking that someone may overwrite your images, then you just have to make sure the ASP.NET account, or whatever account your site is running under, has only Read permissions to the folder.
rashidfarooq 30-Mar-11 6:11am    
Thanks a lot for guiding me.
donot give 777 permission to that folder
 
Share this answer
 
Comments
rashidfarooq 29-Mar-11 11:29am    
If I do not give 777 permission, How can I Upload images to that directory.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900