Implement real async COS image upload

This commit is contained in:
Tim
2025-07-01 10:18:53 +08:00
parent 48abc381db
commit 87b9e9acd3
8 changed files with 77 additions and 10 deletions

View File

@@ -10,5 +10,10 @@ public abstract class ImageUploader {
* @param filename name of the file
* @return accessible URL of the uploaded file
*/
public abstract String upload(byte[] data, String filename);
/**
* Upload an image asynchronously and return a future of its accessible URL.
* Implementations should complete the future exceptionally on failures so
* callers can react accordingly.
*/
public abstract java.util.concurrent.CompletableFuture<String> upload(byte[] data, String filename);
}