From eb2be90e74adfa06ee251f80c08243d0301ce467 Mon Sep 17 00:00:00 2001 From: 疯狂的狮子li <15040126243@163.com> Date: 星期三, 28 七月 2021 10:49:16 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/dev' --- ruoyi-oss/src/main/java/com/ruoyi/oss/service/ICloudStorageService.java | 74 +++++++++++++++++++++++++++++++++++++ 1 files changed, 74 insertions(+), 0 deletions(-) diff --git a/ruoyi-oss/src/main/java/com/ruoyi/oss/service/ICloudStorageService.java b/ruoyi-oss/src/main/java/com/ruoyi/oss/service/ICloudStorageService.java new file mode 100644 index 0000000..a23c1f5 --- /dev/null +++ b/ruoyi-oss/src/main/java/com/ruoyi/oss/service/ICloudStorageService.java @@ -0,0 +1,74 @@ +package com.ruoyi.oss.service; + +import com.ruoyi.oss.entity.UploadResult; + +import java.io.InputStream; + +/** + * 浜戝瓨鍌ㄦ湇鍔℃帴鍙� + * + * @author Lion Li + */ +public interface ICloudStorageService { + + void createBucket(); + + /** + * 鑾峰彇鏈嶅姟鍟嗙被鍨� + */ + String getServiceType(); + + /** + * 鏂囦欢璺緞 + * + * @param prefix 鍓嶇紑 + * @param suffix 鍚庣紑 + * @return 杩斿洖涓婁紶璺緞 + */ + String getPath(String prefix, String suffix); + + /** + * 鏂囦欢涓婁紶 + * + * @param data 鏂囦欢瀛楄妭鏁扮粍 + * @param path 鏂囦欢璺緞锛屽寘鍚枃浠跺悕 + * @return 杩斿洖http鍦板潃 + */ + UploadResult upload(byte[] data, String path, String contentType); + + /** + * 鏂囦欢鍒犻櫎 + * + * @param path 鏂囦欢璺緞锛屽寘鍚枃浠跺悕 + */ + void delete(String path); + + /** + * 鏂囦欢涓婁紶 + * + * @param data 鏂囦欢瀛楄妭鏁扮粍 + * @param suffix 鍚庣紑 + * @return 杩斿洖http鍦板潃 + */ + UploadResult uploadSuffix(byte[] data, String suffix, String contentType); + + /** + * 鏂囦欢涓婁紶 + * + * @param inputStream 瀛楄妭娴� + * @param path 鏂囦欢璺緞锛屽寘鍚枃浠跺悕 + * @return 杩斿洖http鍦板潃 + */ + UploadResult upload(InputStream inputStream, String path, String contentType); + + /** + * 鏂囦欢涓婁紶 + * + * @param inputStream 瀛楄妭娴� + * @param suffix 鍚庣紑 + * @return 杩斿洖http鍦板潃 + */ + UploadResult uploadSuffix(InputStream inputStream, String suffix, String contentType); + + String getEndpointLink(); +} -- Gitblit v1.9.3