I'm trying to handle file uploads using the example at https://laravel.com/docs/5.2/requests#files. I was expecting that when I did $file->move() it would go to storage/app but it's going to /public instead. Any ideas? Thanks.
The $destinationPath was documents/some_folder_name. It appears that Request->file() is a Symphony class that doesn't use the Laravel Filesystem drivers. Not sure where it's getting it's storage root but it's /storage.
If I use storage_path('app/documents') as the document root it works as expected and stores the files in storage/app/documents.
In case anyone is wondering what I did to sanitize the custom folder and file names, I'm using this - https://gist.github.com/dhaupin/b109d3a8464239b7754a to generate something like this - app/documents/test_one_with_file_21/test1_with_a_realy_long_name_1.pdf where the filename is generated from test1 with a realy long name (1).pdf and the folder is generated from Test One With File plus a record id (for collision avoidance).
Here are a few more folder examples from Faker company names: