tus-js-client: fix fingerprint type

This commit is contained in:
Yaroslav 2018-11-25 18:41:50 +03:00
parent 36a32d8a72
commit e6ad724857
2 changed files with 2 additions and 2 deletions

View File

@ -6,7 +6,7 @@
export interface UploadOptions {
endpoint: string;
fingerprint?: string;
fingerprint?: (file: File, options?: UploadOptions) => string;
resume?: boolean;
metadata?: { [key: string]: string };
onProgress?: ((bytesSent: number, bytesTotal: number) => void) | null;

View File

@ -10,7 +10,7 @@ const file = new File(["foo"], "foo.txt", {
const upload = new Tus.Upload(file, {
endpoint: "",
fingerprint: "fingerprint",
fingerprint: (file: File) => file.name,
resume: true,
metadata: {
filename: "foo.txt"