|
@@ -76,10 +76,10 @@ class Upload extends Controller
|
|
|
$storage = new StorageClient(['projectId' => 'dihua-01', 'keyFilePath' => $keyFilePath]);
|
|
|
$bucket = $storage->bucket('freeshippingvps');
|
|
|
|
|
|
- $filePathAbsolute = '/etc/nginx/nginx/html/vape_shop/public/uploads/' . $fileInfo['file_path'];
|
|
|
+ $filePathAbsolute = public_path() . 'uploads/' . $fileInfo['file_path'];
|
|
|
list($storeId, $date, $fileName) = explode('/', $fileInfo['file_path']);
|
|
|
|
|
|
- $thumbnailFile = $storeId . '/' . $date . '/TH' . $fileName;// 缩略图保存路径
|
|
|
+ $thumbnailFile = public_path() . 'uploads/' . $storeId . '/' . $date . '/TH' . $fileName;// 缩略图保存路径
|
|
|
// 使用示例
|
|
|
try {
|
|
|
createThumbnail($filePathAbsolute, $thumbnailFile, 100, 80); // 创建缩略图
|