Fixed filename
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
6bef8620e4
commit
4c898a8741
1 changed files with 2 additions and 3 deletions
|
@ -26,17 +26,16 @@ class LocationsFilesController extends Controller
|
|||
*/
|
||||
public function store(UploadFileRequest $request, Location $location) : RedirectResponse
|
||||
{
|
||||
|
||||
$this->authorize('update', $location);
|
||||
|
||||
if ($request->hasFile('file')) {
|
||||
|
||||
if (! Storage::exists('private_uploads/locations')) {
|
||||
Storage::makeDirectory('private_uploads/locations', 775);
|
||||
}
|
||||
|
||||
foreach ($request->file('file') as $file) {
|
||||
|
||||
$file_name = $request->handleFile('private_uploads/locations/','model-'.$location->id,$file);
|
||||
$file_name = $request->handleFile('private_uploads/locations/','location-'.$location->id, $file);
|
||||
$location->logUpload($file_name, $request->get('notes'));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue