mirror of
https://github.com/HeyPuter/puter.git
synced 2026-08-26 16:07:13 +00:00
Add UploadOptions for Puter.js types (#1832)
* Add UploadOptions * Add name option
This commit is contained in:
Vendored
+7
-1
@@ -227,7 +227,7 @@ interface FileSystem {
|
||||
rename(path: string, newName: string): Promise<FSItem>;
|
||||
space(): Promise<SpaceInfo>;
|
||||
stat(path: string): Promise<FSItem>;
|
||||
upload(items: FileList | File[] | Blob[], dirPath?: string, options?: object): Promise<FSItem[]>;
|
||||
upload(items: FileList | File[] | Blob[], dirPath?: string, options?: UploadOptions): Promise<FSItem[]>;
|
||||
write(path: string, data?: string | File | Blob, options?: WriteOptions): Promise<FSItem>;
|
||||
}
|
||||
|
||||
@@ -268,6 +268,12 @@ interface WriteOptions {
|
||||
createMissingParents?: boolean;
|
||||
}
|
||||
|
||||
interface UploadOptions {
|
||||
overwrite?: boolean;
|
||||
dedupeName?: boolean;
|
||||
name?: string;
|
||||
}
|
||||
|
||||
interface SpaceInfo {
|
||||
capacity: number;
|
||||
used: number;
|
||||
|
||||
Reference in New Issue
Block a user