Commit ef5836d2 authored by liuyuzhen's avatar liuyuzhen

图片后缀

parent 7c3a89cd
...@@ -188,7 +188,7 @@ class Common ...@@ -188,7 +188,7 @@ class Common
break; break;
default: default:
foreach ($files as $f) { foreach ($files as $f) {
$output = $staticUrl . '/' .$directory . $f; $output = $staticUrl . '/' .$directory . $f.\Our\NameConst::jpgSuffix;
} }
break; break;
} }
......
...@@ -100,6 +100,10 @@ class ImageUtil { ...@@ -100,6 +100,10 @@ class ImageUtil {
if (is_null($ossClient)) { if (is_null($ossClient)) {
\Error\ErrorModel::throwException(\Error\CodeConfigModel::ossServerSetError); \Error\ErrorModel::throwException(\Error\CodeConfigModel::ossServerSetError);
} }
if(strpos($uploadImageName,\Our\NameConst::dot)===false){
$uploadImageName = $uploadImageName.\Our\NameConst::jpgSuffix;
}
$ossUploadFilePath = $path.$uploadImageName; $ossUploadFilePath = $path.$uploadImageName;
//return $ossUploadFilePath; //return $ossUploadFilePath;
$return = $ossClient->uploadFile($bucketName, $ossUploadFilePath, $filePath); $return = $ossClient->uploadFile($bucketName, $ossUploadFilePath, $filePath);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment