同步代码

This commit is contained in:
lxj
2025-08-04 19:50:46 +08:00
parent 1d474d735e
commit 1f4e168b56
12 changed files with 329 additions and 35 deletions

View File

@@ -1,6 +1,5 @@
package org.dromara.resource.api;
import jakarta.servlet.http.HttpServletResponse;
import org.dromara.common.core.exception.ServiceException;
import org.dromara.resource.api.domain.RemoteFile;
@@ -22,6 +21,14 @@ public interface RemoteFileService {
*/
RemoteFile upload(String name, String originalFilename, String contentType, byte[] file) throws ServiceException;
/**
* 文件上传
* @param file 文件信息
* @return 结果
* @throws ServiceException
*/
RemoteFile upload(byte[] file) throws ServiceException;
/**
* 通过ossId查询对应的url
*
@@ -41,7 +48,7 @@ public interface RemoteFileService {
/**
* 文件下载方法,支持一次性下载完整文件
*
* @param ossId OSS对象ID
* @param ossId OSS对象ID
* @return byte[] 返回下载的字节数组
*/
byte[] downloadToByteArray(Long ossId) throws IOException;