Published 9 months ago by jerauf
I've got this code from my file upload form.
$file_name = $request->file('file_name'); $path = $request->file('file_name')->store('uploads');
The uploads folder is set to read/write access 777. If I return $path, it gives me the right path and the new name of the file. But the file isn't on me server.
I've also tried:
$path = Storage::putFile('uploads', $request->file('file_name'));
That hasn't worked either.
What am I doing wrong?
However, when I try to access the file, I'm given an error:
File `storage/app/uploads/8UpdkvL3QsiDu3oh3qILd9GO7Exhtpm9IgnnnUUr.jpeg` does not exist
And when I go to domain.com/storage/app/uploads/8UpdkvL3QsiDu3oh3qILd9GO7Exhtpm9IgnnnUUr.jpeg, I get a page not found error.