Client error: PUT http://v0.api.upyun.com/hezuopingtai/ resulted in a 403 Forbidden response:
{“msg”:“path is not a file, maybe a directory”,“code”:40300015,“id”:“81004e90ea54e96bcf3a578de9035808”}
return Storage::disk(‘upyun’)->put(’/’, $request->file(‘file_data’));
按视频的方法出现这个问题。
Client error: PUT http://v0.api.upyun.com/hezuopingtai/ resulted in a 403 Forbidden response:
{“msg”:“path is not a file, maybe a directory”,“code”:40300015,“id”:“6ee88706e6e5424c7ef4b7a2d8059f49”}
可能一:没有生成随机名。因为我传’/'报path is not a file, maybe a directory
可能二:put的第二个参数没有被实例。Storage::disk(‘upyun’)->put(‘test.jpg’, $request->file(‘file_data’));可以在upyun 上生成test.jpg,但是里面什么都没有。