mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-02-24 07:00:49 +08:00
Implement real async COS image upload
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user