Try Storage::path($filename) instead. Does it say the same?
Also try dd($path); to see where it points
Hello everyone.
On my website the user can upload an xls or xlsx file in order to import data into a database.
This is a portion of my upload function:
$request->validate([
'xlsFileUploadForm' => 'required|file|max:1024|mimes:xls,xlsx',
]);
$extension = $request->xlsFileUploadForm->extension();
$path = $request->xlsFileUploadForm->storeAs('xlsFiles', 'xlsFile'.'.'.$extension);
To read the xls file, I use the library "spreadsheet-reader". I call it like this:
$Reader = new SpreadsheetReader($path);
However, this doesn't seem to work. In the constructor the library uses the is_readable() method to check ... well.. if the file is readable. This always returns false for me. To get more information I used the is_file() method before calling the library, but that also returns false. I also tried other links, like Storage::url($filename); but that doesn't work neither.
What am I doing wrong?
You should consider switching to https://github.com/Maatwebsite/Laravel-Excel
Your package seems kind of old, if I saw the correct package.
Latest commit f6bd49d on Apr 30, 2015
Please or to participate in this conversation.