我的文件存储在 laravel progect storage\app\file.jpg , file1.jpg 等我需要上传例如 3 个文件。我用:
foreach ($doc['imageIds'] as $image_id) {
$imageBinary = $this->client->getImageBinary($details->inspection_id, $image_id);
$name_file = $doc_type.'-'.$profile->model_type.'-'.$profile->model_id.'-'.$image_id.'.jpg';
$path_file = storage_path('app\\'.$name_file);
Storage::put($name_file, $imageBinary);
$api = new Uploadcare\Api($uc_public_key, $uc_secret_key);
$file = $api->uploader->fromPath($path_file);
$store = $file->store();
Storage::delete($name_file);
dd($store);
}
接下来我使用 uuid 进行群组上传
邮递员
并得到这个
https://ucarecdn.com/8f5e00a3-a58d-474e-9d07-184af6aff2fe~3/
如何通过库进行群组文件上传?"uploadcare/uploadcare-php": "^2.2",