|
@@ -22,13 +22,13 @@ class FileUploadController extends BaseController
|
|
|
//获取文件的位置
|
|
|
public function getFile($file_name){
|
|
|
$path = storage_path() . "/app/public/upload_files/".$file_name;
|
|
|
- $ext = '';
|
|
|
- foreach (FileUploadService::FILE_TYPE as $value){
|
|
|
- if(file_exists($path. '.' . $value)){
|
|
|
- $ext = $value;
|
|
|
- }
|
|
|
- }
|
|
|
- if(empty($ext)) return '';
|
|
|
- return response()->file($path.'.'.$ext);
|
|
|
+// $ext = '';
|
|
|
+// foreach (FileUploadService::FILE_TYPE as $value){
|
|
|
+// if(file_exists($path. '.' . $value)){
|
|
|
+// $ext = $value;
|
|
|
+// }
|
|
|
+// }
|
|
|
+// if(empty($ext)) return ''; .'.'.$ext
|
|
|
+ return response()->file($path);
|
|
|
}
|
|
|
}
|