1
我在Heroku中使用Laravel 5.1框架和Clear DB廣告將文件上傳到Heroku應用程序時出現問題。
已經閱讀Laravel文檔,但我認爲這個問題是在保存方法... 我的意思是在本地模式下正常工作:Heroku Laravel 5.1文件系統上傳
1) \Storage::disk('local')->put($name, \File::get($file));
or
2)
$name = $request->file->getClientOriginalName();
Storage::put($name,
file_get_contents($request->file('path')->getRealPath())
);
I use "\Storage::disk('local')" because i supose 's3' for amazon and Rackspace Cloud Storage... shall i use disk('web') or something like that?
any suggestion?
這就是爲什麼我試圖以不同的方式上傳,但沒有人工作,大聲笑 謝謝你! –