|
@@ -73,9 +73,9 @@ public class FileUploadController {
|
|
|
ByteArrayOutputStream os = new ByteArrayOutputStream();
|
|
ByteArrayOutputStream os = new ByteArrayOutputStream();
|
|
|
ImageIO.write(img, ext, os);
|
|
ImageIO.write(img, ext, os);
|
|
|
InputStream is = new ByteArrayInputStream(os.toByteArray());
|
|
InputStream is = new ByteArrayInputStream(os.toByteArray());
|
|
|
- return "https://"+storageService.uploadFromInputStream(is, path);
|
|
|
|
|
|
|
+ return storageService.uploadFromInputStream(is, path);
|
|
|
}
|
|
}
|
|
|
- return "https://"+storageService.uploadFromInputStream(file.getInputStream(), path);
|
|
|
|
|
|
|
+ return storageService.uploadFromInputStream(file.getInputStream(), path);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@PostMapping("/base64")
|
|
@PostMapping("/base64")
|
|
@@ -141,9 +141,9 @@ public class FileUploadController {
|
|
|
ByteArrayOutputStream os = new ByteArrayOutputStream();
|
|
ByteArrayOutputStream os = new ByteArrayOutputStream();
|
|
|
ImageIO.write(img, ext, os);
|
|
ImageIO.write(img, ext, os);
|
|
|
InputStream is = new ByteArrayInputStream(os.toByteArray());
|
|
InputStream is = new ByteArrayInputStream(os.toByteArray());
|
|
|
- url = "https://"+storageService.uploadFromInputStream(is, path);
|
|
|
|
|
|
|
+ url = storageService.uploadFromInputStream(is, path);
|
|
|
} else {
|
|
} else {
|
|
|
- url = "https://"+storageService.uploadFromInputStream(new FileInputStream(tmpFile), path);
|
|
|
|
|
|
|
+ url = storageService.uploadFromInputStream(new FileInputStream(tmpFile), path);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
String thumbUrl = null;
|
|
String thumbUrl = null;
|