| | |
| | | import com.example.jz.service.MinIOService; |
| | | import io.minio.MinioClient; |
| | | import io.minio.PutObjectOptions; |
| | | import jdk.internal.org.objectweb.asm.tree.FieldInsnNode; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | @Value("${minio.bucketName}") |
| | | String bucketName; |
| | | |
| | | private static final String PATH = "http://221.237.182.28:19000/"; |
| | | |
| | | |
| | | @Override |
| | | public String getPreviewFileUrl(String fileName) { |
| | | try { |
| | | return url + bucketName + '/' + fileName; |
| | | return PATH + bucketName + '/' + fileName; |
| | | } catch (Exception e) { |
| | | throw new BusinessException("获取文件预览地址失败"); |
| | | } |