本地生活商品图片上传到阿里云OSS

This commit is contained in:
wangxiaowei 2024-08-21 10:56:21 +08:00
parent befe1c376f
commit 1b34273b31

@ -64,13 +64,14 @@ class File extends Api
$post = $this->request->post();
if (is_array(self::$APP_UPLOAD_PATH[$post['type']])) {
$path = self::$APP_UPLOAD_PATH[$post['type']];
// 本地生活商家上传商品
if ($post['type'] === 'local_shop_add' && $post['lstore_id'] > 0) {
$path .= '/' . $post['lstore_id'];
} else {
return JsonServer::error('缺少参数');
}
dump($path);
dump($post);die;
$result = UploadAliOSS::uploadImage($path);
dump($result);die;