|
@@ -51,7 +51,7 @@ class FileUploadService extends Service
|
|
|
}
|
|
|
|
|
|
//获取文件的位置oss
|
|
|
- public function getFileShow($file_name){
|
|
|
+ public function getFileShow($file_name,$expired = 3500){
|
|
|
$path = "";
|
|
|
if(empty($file_name)) return $path;
|
|
|
|
|
@@ -62,12 +62,12 @@ class FileUploadService extends Service
|
|
|
$date = \DateTime::createFromFormat('Ymd', $timestamp);
|
|
|
$date = $date->format('Y-m-d');
|
|
|
$savePath = $document . $date . '/' . $file_name;
|
|
|
- list($status,$path) = (new OssService())->getTemporaryUrl($savePath);
|
|
|
+ list($status,$path) = (new OssService())->getTemporaryUrl($savePath,$expired);
|
|
|
}else{
|
|
|
if(strpos($file_name, FileUploadService::string) !== false){
|
|
|
$file_name = str_replace(FileUploadService::string ,'', $file_name);
|
|
|
$savePath = $document . 'old/upload_files/' . $file_name;
|
|
|
- list($status,$path) = (new OssService())->getTemporaryUrl($savePath);
|
|
|
+ list($status,$path) = (new OssService())->getTemporaryUrl($savePath,$expired);
|
|
|
}
|
|
|
}
|
|
|
|