package cn.iocoder.yudao.module.system.api.storage;
|
|
import cn.iocoder.yudao.module.system.controller.admin.storage.vo.SystemStorageBlobRespVO;
|
import cn.iocoder.yudao.module.system.service.storage.SystemStorageBlobService;
|
import jakarta.annotation.Resource;
|
import org.springframework.stereotype.Service;
|
|
@Service
|
public class StorageBlobApiImpl implements StorageBlobApi {
|
|
@Resource
|
private SystemStorageBlobService systemStorageBlobService;
|
|
@Override
|
public Long saveBlob(byte[] content, String originalFileName, String contentType) {
|
// 业务文件不进公共目录:走临时签名地址,与前端上传的默认行为保持一致
|
SystemStorageBlobRespVO blob = systemStorageBlobService.saveBlob(content, originalFileName, contentType, false);
|
return blob == null ? null : blob.getId();
|
}
|
|
}
|