|
...
|
...
|
@@ -20,7 +20,7 @@ class CosService |
|
|
|
* @method :post
|
|
|
|
* @time :2023/7/19 15:28
|
|
|
|
*/
|
|
|
|
public function uploadFile($path,$filename)
|
|
|
|
public function uploadFile(&$files,$path,$filename)
|
|
|
|
{
|
|
|
|
$cos = config('filesystems.disks.cos');
|
|
|
|
$cosClient = new Client([
|
|
...
|
...
|
@@ -34,7 +34,7 @@ class CosService |
|
|
|
$cosClient->putObject([
|
|
|
|
'Bucket' => $cos['bucket'],
|
|
|
|
'Key' => $key,
|
|
|
|
'Body' => fopen(config('filesystems.disks.upload')['root'].$path.'/'.$filename, 'r'),
|
|
|
|
'Body' => fopen($files->getRealPath(), 'r'),
|
|
|
|
]);
|
|
|
|
return $key;
|
|
|
|
}
|
...
|
...
|
|