--图书分类
This commit is contained in:
@@ -32,7 +32,6 @@ public class OssServiceImpl implements OssService {
|
||||
InputStream inputStream = file.getInputStream();
|
||||
//获取文件名称
|
||||
String fileName = file.getOriginalFilename();
|
||||
|
||||
//1 在文件名称里面添加随机唯一的值
|
||||
String uuid = UUID.randomUUID().toString().replaceAll("-","");
|
||||
// yuy76t5rew01.jpg
|
||||
@@ -59,6 +58,7 @@ public class OssServiceImpl implements OssService {
|
||||
//需要把上传到阿里云oss路径手动拼接出来
|
||||
// https://edu-guli-1010.oss-cn-beijing.aliyuncs.com/01.jpg
|
||||
String url = "https://"+bucketName+"."+endpoint+"/"+fileName;
|
||||
|
||||
return url;
|
||||
}catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
|
||||
Reference in New Issue
Block a user