| | |
| | | import com.ard.oss.model.enums.OssTypeEnum; |
| | | import com.ard.oss.service.IOssService; |
| | | import io.minio.PutObjectArgs; |
| | | import lombok.Cleanup; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.StringUtils; |
| | |
| | | ? extractFilename(file) |
| | | : object; |
| | | |
| | | @Cleanup |
| | | InputStream inputStream = file.getInputStream(); |
| | | // 上传文件到 Minio |
| | | this.ossService.putObject(bucket, objectName, file.getInputStream()); |
| | | this.ossService.putObject(bucket, objectName, inputStream); |
| | | |
| | | // ✅ 拼接永久 URL(不带 presigned 过期参数) |
| | | String baseUrl = OssConfiguration.endpoint; |