mirror of
https://github.com/rikkaneko/paste.git
synced 2025-08-05 05:30:09 +01:00
Add large paste (API V2)
Generate S3 pre-signed url Fix Content-Disposition charsets Signed-off-by: Joe Ma <rikkaneko23@gmail.com>
This commit is contained in:
parent
8623fb74d9
commit
76e8d074dc
8 changed files with 550 additions and 227 deletions
9
src/types.d.ts
vendored
9
src/types.d.ts
vendored
|
@ -5,15 +5,19 @@ export type ERequest = {
|
|||
// match_etag?: string;
|
||||
} & IRequest;
|
||||
|
||||
export type PASTE_TYPES = 'paste' | 'link' | 'large_paste';
|
||||
|
||||
export interface PasteIndexEntry {
|
||||
title?: string;
|
||||
mime_type?: string;
|
||||
last_modified: number;
|
||||
expiration?: number; // New added in 2.0
|
||||
size: number;
|
||||
password?: string;
|
||||
editable?: boolean; // Default: False (unsupported)
|
||||
read_count_remain?: number;
|
||||
type?: string;
|
||||
type: PASTE_TYPES;
|
||||
// Only apply when large_paste
|
||||
upload_completed?: boolean;
|
||||
sha256_hash?: string;
|
||||
}
|
||||
|
@ -26,5 +30,6 @@ export interface Env {
|
|||
LARGE_AWS_ACCESS_KEY_ID?: string;
|
||||
LARGE_AWS_SECRET_ACCESS_KEY?: string;
|
||||
ENDPOINT: string;
|
||||
LARGE_ENDPOINT: string;
|
||||
LARGE_ENDPOINT?: string;
|
||||
LARGE_DOWNLOAD_ENDPOINT?: string;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue