feat(resource): 1
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
This commit is contained in:
parent
26b609ea81
commit
0cb299d383
@ -2,6 +2,7 @@ package org.dromara.resource.api;
|
|||||||
|
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import jakarta.servlet.http.HttpServletResponse;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.dromara.common.core.exception.ServiceException;
|
||||||
import org.dromara.common.core.utils.StringUtils;
|
import org.dromara.common.core.utils.StringUtils;
|
||||||
import org.dromara.resource.api.domain.RemoteFile;
|
import org.dromara.resource.api.domain.RemoteFile;
|
||||||
|
|
||||||
@ -28,6 +29,18 @@ public class RemoteFileServiceMock implements RemoteFileService {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件上传
|
||||||
|
*
|
||||||
|
* @param file 文件信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public RemoteFile uploadImg(byte[] file) {
|
||||||
|
log.warn("服务调用异常 -> 降级处理");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过ossId查询对应的url
|
* 通过ossId查询对应的url
|
||||||
*
|
*
|
||||||
@ -55,7 +68,7 @@ public class RemoteFileServiceMock implements RemoteFileService {
|
|||||||
/**
|
/**
|
||||||
* 文件下载方法,支持一次性下载完整文件
|
* 文件下载方法,支持一次性下载完整文件
|
||||||
*
|
*
|
||||||
* @param ossId OSS对象ID
|
* @param ossId OSS对象ID
|
||||||
* @return byte[] 返回下载的字节数组
|
* @return byte[] 返回下载的字节数组
|
||||||
*/
|
*/
|
||||||
public byte[] downloadToByteArray(Long ossId) throws IOException {
|
public byte[] downloadToByteArray(Long ossId) throws IOException {
|
||||||
|
Loading…
Reference in New Issue
Block a user