php - Why am I getting File Does Not Exist error on App Engine when it's there in Storage, Using Laravel-Excel -
running php on app engine, laravel 5.1.
the app failing on \excel::load($path); statement afterwards when @ app engine storage path file there. here code:
$file = $file->move($destpath,$filename); $path = $file->getpathname(); if (in_array($file->getextension(), ['xlsx', 'xlsm', 'xltx', 'xltm', 'xls', 'xlt'])){ $newfile = \excel::load($path); //fails here $info = $newfile->store('csv', storage_path('imports'), true); \file::delete($path); $path = $info['full']; }
i tried putting sleep between file->move statement didn't have effect.
any suggestions appreciated.
since first posted here's we've tried.
- we tried uploading spreadsheet directly (by passing $file->move) , loading that. didn't work.
- on theory open office writing file wasn't compatible, tried file save using excel. didn't work.
- on theory excel5 file didn't work, tried excel2007. didn't work.
- tested simple fopen, fget, fseek. worked.
here's stack trace.
in excel2007.php line 82 @ phpexcel_reader_excel2007->canread('/base/data/home/apps/s~populous-2-0/20170914t111153.404103259874586280/gs://populous-2-0.appspot.com/storage/imports/staff_import_17_1505402010.xlsx') in formatidentifier.php line 249 @ formatidentifier->canread('excel2007', '/base/data/home/apps/s~populous-2-0/20170914t111153.404103259874586280/gs://populous-2-0.appspot.com/storage/imports/staff_import_17_1505402010.xlsx') in formatidentifier.php line 51 @ formatidentifier->getformatbyfile('/base/data/home/apps/s~populous-2-0/20170914t111153.404103259874586280/gs://populous-2-0.appspot.com/storage/imports/staff_import_17_1505402010.xlsx') in laravelexcelreader.php line 1341 @ laravelexcelreader->_setformat() in laravelexcelreader.php line 777 @ laravelexcelreader->_init('gs://populous-2-0.appspot.com/storage/imports/staff_import_17_1505402010.xlsx', null, false) in laravelexcelreader.php line 275 @ laravelexcelreader->load('gs://populous-2-0.appspot.com/storage/imports/staff_import_17_1505402010.xlsx', null, false, null) in excel.php line 119 @ excel->load('gs://populous-2-0.appspot.com/storage/imports/staff_import_17_1505402010.xlsx') in facade.php line 215 @ facade::__callstatic('load', array('gs://populous-2-0.appspot.com/storage/imports/staff_import_17_1505402010.xlsx')) in staffcontroller.php line 173 @ excel::load('gs://populous-2-0.appspot.com/storage/imports/staff_import_17_1505402010.xlsx') in staffcontroller.php line 173
Comments
Post a Comment