feat: support presigned url upload

This commit is contained in:
Tim
2025-07-31 22:34:27 +08:00
parent 68e3daa736
commit ea17240cf1
4 changed files with 50 additions and 21 deletions

View File

@@ -38,6 +38,14 @@ public abstract class ImageUploader {
protected abstract void deleteFromStore(String key);
/**
* Generate a presigned PUT URL for direct browser upload.
* Default implementation is unsupported.
*/
public java.util.Map<String, String> presignUpload(String filename) {
throw new UnsupportedOperationException("presignUpload not supported");
}
/** Extract COS URLs from text. */
public Set<String> extractUrls(String text) {
Set<String> set = new HashSet<>();