xuqiang 3 years ago
parent
commit
8c49612ef6
1 changed files with 5 additions and 4 deletions
  1. 5 4
      src/main/java/com/izouma/nineth/web/FileUploadController.java

+ 5 - 4
src/main/java/com/izouma/nineth/web/FileUploadController.java

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