Skip to content

Commit 4a91c0e

Browse files
committed
fix: update adapter for return structured upload URL and extra parameters
1 parent 22afc27 commit 4a91c0e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

adminforth/types/Adapters.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,13 @@ export interface StorageAdapter {
146146
* @param key - The key of the file to be uploaded e.g. "uploads/file.txt"
147147
* @param expiresIn - The expiration time in seconds for the presigned URL
148148
* @param contentType - The content type of the file to be uploaded
149+
*
150+
* @returns A promise that resolves to an object containing the upload URL and any extra parameters which should be sent with PUT multipart form data
149151
*/
150-
getUploadSignedUrl(key: string, contentType: string, expiresIn?: number): Promise<string>;
152+
getUploadSignedUrl(key: string, contentType: string, expiresIn?: number): Promise<{
153+
uploadUrl: string;
154+
uploadExtraParams?: Record<string, string>;
155+
}>;
151156

152157
/**
153158
* This method should return the URL for the given key capable of download (200 GET request with response or 200 HEAD request without response).

0 commit comments

Comments
 (0)