mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-06-09 19:47:39 +08:00
feat: upload 本身不进行引用计数
This commit is contained in:
@@ -31,10 +31,7 @@ public abstract class ImageUploader {
|
|||||||
* Upload an image asynchronously and return a future of its accessible URL.
|
* Upload an image asynchronously and return a future of its accessible URL.
|
||||||
*/
|
*/
|
||||||
public CompletableFuture<String> upload(byte[] data, String filename) {
|
public CompletableFuture<String> upload(byte[] data, String filename) {
|
||||||
return doUpload(data, filename).thenApply(url -> {
|
return doUpload(data, filename).thenApply(url -> url);
|
||||||
addReference(url);
|
|
||||||
return url;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected abstract CompletableFuture<String> doUpload(byte[] data, String filename);
|
protected abstract CompletableFuture<String> doUpload(byte[] data, String filename);
|
||||||
|
|||||||
Reference in New Issue
Block a user