1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
| package com.sandu.common.file;
|
|
| import cn.hutool.core.collection.CollectionUtil;
| import org.springframework.web.multipart.MultipartFile;
|
| import java.util.List;
|
| /**
| * @author chenjiantian
| * @date 2020-12-17
| * 文件上传服务类 有多个实现
| */
| public interface FileService {
|
| /**
| * 将图片图片转存为自己的存储介质(本地、OSS、fastDfs)
| *
| * @param file 客户端发送的文件
| * @return 新图片地址
| */
| FileStorage uploadFile(MultipartFile file);
|
| static List<String> videoSuffixList = CollectionUtil.newArrayList("mp4", "mov", "avi", "mkv", "m4v", "wmv",
| "asf", "asx", "rm", "rmvb", "3gp", "dat", "flv", "vob");
| static List<String> imageSuffixList = CollectionUtil.newArrayList("jpg","jpeg", "png", "gif", "tif", "bmp", "psd");
|
| }
|
|