Use GetObjectAttributes to get object size (large_paste)

Fix CORS handling

Signed-off-by: Joe Ma <rikkaneko23@gmail.com>
This commit is contained in:
Joe Ma 2024-02-04 19:23:09 +08:00
parent 6be1e97122
commit 2f67469ef5
No known key found for this signature in database
GPG key ID: 7A0ECF5F5EDC587F
7 changed files with 91 additions and 38 deletions

3
src/types.d.ts vendored
View file

@ -2,6 +2,7 @@ import { IRequest } from 'itty-router';
export type ERequest = {
is_browser: boolean;
origin?: string;
// match_etag?: string;
} & IRequest;
@ -20,6 +21,8 @@ export interface PasteIndexEntry {
// Only apply when large_paste
upload_completed?: boolean;
sha256_hash?: string;
cached_presigned_url?: string;
cached_presigned_url_expiration?: string;
}
export interface Env {