Merge remote-tracking branch 'origin/dev_shb' into dev-xp
This commit is contained in:
@@ -16,6 +16,7 @@ import lombok.AllArgsConstructor;
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.Valid;
|
||||
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
@@ -29,6 +30,7 @@ import java.util.List;
|
||||
*/
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@RequestMapping("/api/workspace")
|
||||
@Api(value = "", tags = "接口")
|
||||
public class WorkspaceController {
|
||||
@@ -40,10 +42,10 @@ public class WorkspaceController {
|
||||
private MinioUtil minIoUtil;
|
||||
|
||||
@Value("${minio.endpoint}")
|
||||
private static String address;
|
||||
public String address;
|
||||
|
||||
@Value("${minio.bucketName}")
|
||||
private static String bucketName;
|
||||
public String bucketName;
|
||||
|
||||
@PostMapping("/upload")
|
||||
public Object upload(MultipartFile file) {
|
||||
@@ -53,6 +55,12 @@ public class WorkspaceController {
|
||||
return address+"/"+bucketName+"/"+upload.get(0);
|
||||
}
|
||||
|
||||
@PostMapping("/getUrl")
|
||||
public Object getUrl() {
|
||||
|
||||
return minIoUtil.getPresignedUrl("test", "R-C_1694066189047.png", 5);
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user