restrict access on public folder in laravel 4.2 -


im new laravel , im working on project needs store files in server. im doing store under public/docs problem files under directory accessible time given know url file. example if logged out if know url http://localhost/dummy/public/uploads/docs/2016-06-02-10-52-43-oth-content-inventory-and-planning-spreadsheet.pdf able access im thinking in routes

route::any('uploads/docs/' , 'go controller check if user can acces'); 

is possible? in advance!

it's called public reason...

you should use storage instead (laravel 5) in storage dont restrict access, actualy opposite, grant access file .

try laravel 4.2 (move file after upload storage folder)

  input::file('file')->move(__dir__.'/storage/',input::file('file')->getclientoriginalname());   }); 

anyway ,the conclusion can't restrict access (you shouldn't if there way) because it's meant public ! should use storage folder(or whatever called in laravel 4)


Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo