-
Notifications
You must be signed in to change notification settings - Fork 935
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Describe the solution
Currently best practice to let user download large file from R2 is to presign URL and send it to user.
It would be very helpful if we had easy sign method here
declare abstract class R2Bucket {
head(key: string): Promise<R2Object | null>;
get(key: string, options: R2GetOptions & {
onlyIf: R2Conditional | Headers;
}): Promise<R2ObjectBody | R2Object | null>;
get(key: string, options?: R2GetOptions): Promise<R2ObjectBody | null>;
put(key: string, value: ReadableStream | ArrayBuffer | ArrayBufferView | string | null | Blob, options?: R2PutOptions & {
onlyIf: R2Conditional | Headers;
}): Promise<R2Object | null>;
put(key: string, value: ReadableStream | ArrayBuffer | ArrayBufferView | string | null | Blob, options?: R2PutOptions): Promise<R2Object>;
createMultipartUpload(key: string, options?: R2MultipartOptions): Promise<R2MultipartUpload>;
resumeMultipartUpload(key: string, uploadId: string): R2MultipartUpload;
delete(keys: string | string[]): Promise<void>;
list(options?: R2ListOptions): Promise<R2Objects>;
}
Now from what I know to presign file we need to pass R2 access and secret key to worker.
I build my infrastructure with Pulumi and it is a pain to get them
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Type
Projects
Status
Untriaged