Laravel File Storage Error

大憨熊 提交于 2019-12-14 03:22:10

问题


I am developing a Laravel 5.4 app and deployed it to Heroku running on free dyno.I am using Google Drive as my cloud storage.I am trying to upload large file,size of 200-300 mb or small file of 10-12 kb to my cloud storage using nao-pon/flysystem.

While uploading file,I am getting this error:

(1/1) ErrorException
A non well formed numeric value encountered
in GoogleDriveAdapter.php (line 1143)
at HandleExceptions->handleError(8, 'A non well formed numeric value encountered', '/app/vendor/nao-pon/flysystem-google-drive/src/GoogleDriveAdapter.php', 1143, array('iniName' => 'memory_limit', 'val' => '128M', 'last' => 'm'))
in GoogleDriveAdapter.php (line 1143)

My file upload controller method is like this:

$file = $request->file('file');
$name = $file->getClientOriginalName();
$myfile=Storage::disk('google')->put($name,fopen($file, 'r+'));

In my .user.ini (To update Heroku server php.ini):

post_max_size = 800M

upload_max_filesize = 700M

Heroku's free dyno php memory limit: 512mb

Update:

I run composer update on my heroku console.Some packages have been updated.But not the symfony\var-dumper package.It's not installed neither updated.I have also try composer update symfony\var-dumper.The console returns Nothing to install or update. I am getting the same error

来源:https://stackoverflow.com/questions/46124539/laravel-file-storage-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!