I am currently saving uploaded images at /cakephp/uploads/ instead of doing it inside /cakephp/app/webroot/imgs/.
When i try to access the image by URL, with something like this:
http://myweb.com/cakephp/uploads/imageName.jpg
It shows a 404 error. I guess, due to the .htaccess, or more concretely, to the web.config file that i use under windows with ISS7.
Is there any way to access to them without modifying the web.config file?
Thanks.
it is my understanding that anything not placed in the
webrootfolder cannot be accessed directly via a url. To access files outside of the webroot, you can use Media Views.I’d just put your
uploadsfolder inside yourAPPfolder,http://myweb.com/cakephp/app/uploadsthen just adjust
pathtopath => APP . 'uploads' . DSIt’s not clear why you want to do this; if you want to just access the images like normal, place the
uploadsin to yourimgdirectory.Typically you’d use this approach for serving files etc, allowing user authentication and so on.