use-tus 0.3.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/README.md +90 -33
  2. package/dist/TusClientProvider/TusClientProvider.d.ts +6 -4
  3. package/dist/TusClientProvider/constants.d.ts +4 -0
  4. package/dist/TusClientProvider/index.d.ts +3 -2
  5. package/dist/{core → TusClientProvider/store}/contexts.d.ts +7 -7
  6. package/dist/{core → TusClientProvider/store}/tucClientActions.d.ts +49 -47
  7. package/dist/{core → TusClientProvider/store}/tusClientReducer.d.ts +18 -18
  8. package/dist/TusClientProvider/types.d.ts +2 -0
  9. package/dist/__stories__/Basic.stories.d.ts +5 -0
  10. package/dist/__stories__/CacheKey.stories.d.ts +5 -0
  11. package/dist/__stories__/DefaultOptions.stories.d.ts +5 -0
  12. package/dist/__stories__/components/BasicButton/BasicButton.d.ts +9 -0
  13. package/dist/__stories__/components/BasicButton/index.d.ts +1 -0
  14. package/dist/__stories__/components/LoadingCircle/LoadingCircle.d.ts +2 -0
  15. package/dist/__stories__/components/LoadingCircle/index.d.ts +1 -0
  16. package/dist/__stories__/components/ProgressBar/ProgressBar.d.ts +7 -0
  17. package/dist/__stories__/components/ProgressBar/index.d.ts +1 -0
  18. package/dist/__stories__/components/UploadIcon/UploadIcon.d.ts +2 -0
  19. package/dist/__stories__/components/UploadIcon/index.d.ts +1 -0
  20. package/dist/__stories__/constants.d.ts +1 -0
  21. package/dist/__tests__/TusClientProvider.test.d.ts +1 -0
  22. package/dist/__tests__/useTus.test.d.ts +1 -0
  23. package/dist/__tests__/useTusStore.test.d.ts +1 -0
  24. package/dist/__tests__/utils/getBlob.d.ts +1 -0
  25. package/dist/__tests__/utils/getDefaultOptions.d.ts +2 -0
  26. package/dist/__tests__/utils/mock.d.ts +6 -0
  27. package/dist/index.cjs.js +289 -1751
  28. package/dist/index.d.ts +3 -4
  29. package/dist/index.esm.js +280 -1719
  30. package/dist/index.js +345 -0
  31. package/dist/useTus/index.d.ts +3 -2
  32. package/dist/useTus/types.d.ts +14 -15
  33. package/dist/useTus/useTus.d.ts +2 -2
  34. package/dist/useTus/useTusStore.d.ts +2 -0
  35. package/dist/useTus/utils/createUpload.d.ts +3 -0
  36. package/dist/useTus/utils/startOrResumeUpload.d.ts +2 -0
  37. package/dist/useTus/utils/useAutoAbort.d.ts +2 -0
  38. package/dist/useTus/utils/useMergeTusOptions.d.ts +6 -0
  39. package/dist/useTusClient/index.d.ts +1 -0
  40. package/dist/useTusClient/useTusClient.d.ts +7 -0
  41. package/package.json +9 -9
  42. package/dist/TusClientProvider/TusController.d.ts +0 -4
  43. package/dist/core/constants.d.ts +0 -4
  44. package/dist/core/tusHandler.d.ts +0 -17
  45. package/dist/core/types.d.ts +0 -8
  46. package/dist/useTus/utils.d.ts +0 -16
  47. package/dist/utils/uid.d.ts +0 -1
package/dist/index.js ADDED
@@ -0,0 +1,345 @@
1
+ import { useEffect, useMemo, useState, useCallback, createContext, useContext, useReducer, createElement } from 'react';
2
+ import { Upload, isSupported } from 'tus-js-client';
3
+
4
+ const createUpload = (file, options, dispatchIsAborted) => {
5
+ const upload = new Upload(file, options);
6
+ const originalStart = upload.start.bind(upload);
7
+ const originalAbort = upload.abort.bind(upload);
8
+ const start = () => {
9
+ originalStart();
10
+ dispatchIsAborted(false);
11
+ };
12
+ const abort = async () => {
13
+ originalAbort();
14
+ dispatchIsAborted(true);
15
+ };
16
+ upload.start = start;
17
+ upload.abort = abort;
18
+ return upload;
19
+ };
20
+
21
+ const startOrResumeUpload = (upload) => {
22
+ upload.findPreviousUploads().then((previousUploads) => {
23
+ if (previousUploads.length) {
24
+ upload.resumeFromPreviousUpload(previousUploads[0]);
25
+ }
26
+ upload.start();
27
+ });
28
+ };
29
+
30
+ const useAutoAbort = (upload, autoAbort) => {
31
+ useEffect(() => {
32
+ const abortUploading = async () => {
33
+ if (!upload) {
34
+ return;
35
+ }
36
+ await upload.abort();
37
+ };
38
+ return () => {
39
+ if (!autoAbort) {
40
+ return;
41
+ }
42
+ abortUploading();
43
+ };
44
+ }, [autoAbort, upload]);
45
+ };
46
+
47
+ const defaultUseTusOptionsValue = Object.freeze({
48
+ autoAbort: true,
49
+ autoStart: false,
50
+ });
51
+ const useMergeTusOptions = (options) => useMemo(() => ({
52
+ ...defaultUseTusOptionsValue,
53
+ ...(options || {}),
54
+ }), [options]);
55
+
56
+ const initialUseTusState = Object.freeze({
57
+ upload: undefined,
58
+ isSuccess: false,
59
+ isAborted: false,
60
+ error: undefined,
61
+ });
62
+ const useTus = (baseOption) => {
63
+ const { autoAbort, autoStart, uploadOptions } = useMergeTusOptions(baseOption);
64
+ const [tusState, setTusState] = useState(initialUseTusState);
65
+ const updateTusState = useCallback((newOptions) => {
66
+ setTusState((tus) => ({
67
+ ...tus,
68
+ ...newOptions,
69
+ }));
70
+ }, []);
71
+ const setUpload = useCallback((file, options = {}) => {
72
+ const targetOptions = {
73
+ ...uploadOptions,
74
+ ...options,
75
+ };
76
+ const onSuccess = () => {
77
+ updateTusState({ isSuccess: true });
78
+ targetOptions?.onSuccess?.();
79
+ };
80
+ const onError = (error) => {
81
+ updateTusState({ error });
82
+ targetOptions?.onError?.(error);
83
+ };
84
+ const mergedUploadOptions = {
85
+ ...targetOptions,
86
+ onSuccess,
87
+ onError,
88
+ };
89
+ const dispatchIsAborted = (isAborted) => {
90
+ updateTusState({ isAborted });
91
+ };
92
+ const upload = createUpload(file, mergedUploadOptions, dispatchIsAborted);
93
+ if (autoStart) {
94
+ startOrResumeUpload(upload);
95
+ }
96
+ updateTusState({ upload });
97
+ }, [autoStart, updateTusState, uploadOptions]);
98
+ const remove = useCallback(() => {
99
+ tusState?.upload?.abort();
100
+ setTusState(initialUseTusState);
101
+ }, [tusState?.upload]);
102
+ const tusResult = useMemo(() => ({
103
+ upload: tusState?.upload,
104
+ isSuccess: tusState?.isSuccess ?? false,
105
+ error: tusState?.error,
106
+ isAborted: tusState?.isAborted ?? false,
107
+ setUpload,
108
+ remove,
109
+ }), [tusState, setUpload, remove]);
110
+ useAutoAbort(tusResult.upload, autoAbort ?? false);
111
+ return tusResult;
112
+ };
113
+
114
+ const ERROR_MESSAGES = {
115
+ tusClientHasNotFounded: "No TusClient set, use TusClientProvider to set one",
116
+ tusIsNotSupported: "This browser does not support uploads. Please use a modern browser instead.",
117
+ };
118
+
119
+ const TusClientStateContext = createContext(undefined);
120
+ const TusClientDispatchContext = createContext(undefined);
121
+ const useTusClientState = () => {
122
+ const tusClientState = useContext(TusClientStateContext);
123
+ if (!tusClientState && process.env.NODE_ENV !== "production") {
124
+ throw new Error(ERROR_MESSAGES.tusClientHasNotFounded);
125
+ }
126
+ return useMemo(() => tusClientState, [tusClientState]);
127
+ };
128
+ const useTusClientDispatch = () => {
129
+ const tusClientDispatch = useContext(TusClientDispatchContext);
130
+ if (!tusClientDispatch && process.env.NODE_ENV !== "production") {
131
+ throw new Error(ERROR_MESSAGES.tusClientHasNotFounded);
132
+ }
133
+ return useMemo(() => tusClientDispatch, [
134
+ tusClientDispatch,
135
+ ]);
136
+ };
137
+
138
+ const insertUploadInstance = (cacheKey, upload) => ({
139
+ type: "INSERT_UPLOAD_INSTANCE",
140
+ payload: {
141
+ cacheKey,
142
+ uploadState: {
143
+ upload,
144
+ isSuccess: false,
145
+ isAborted: false,
146
+ },
147
+ },
148
+ });
149
+ const updateSuccessUpload = (cacheKey) => ({
150
+ type: "UPDATE_SUCCESS_UPLOAD",
151
+ payload: {
152
+ cacheKey,
153
+ },
154
+ });
155
+ const updateErrorUpload = (cacheKey, error) => ({
156
+ type: "UPDATE_ERROR_UPLOAD",
157
+ payload: {
158
+ cacheKey,
159
+ error,
160
+ },
161
+ });
162
+ const updateIsAbortedUpload = (cacheKey, isAborted) => ({
163
+ type: "UPDATE_IS_ABORTED_UPLOAD",
164
+ payload: {
165
+ cacheKey,
166
+ isAborted,
167
+ },
168
+ });
169
+ const removeUploadInstance = (cacheKey) => ({
170
+ type: "REMOVE_UPLOAD_INSTANCE",
171
+ payload: {
172
+ cacheKey,
173
+ },
174
+ });
175
+ const updateDefaultOptions = (defaultOptions) => ({
176
+ type: "UPDATE_DEFAULT_OPTIONS",
177
+ payload: {
178
+ defaultOptions,
179
+ },
180
+ });
181
+
182
+ const useTusStore = (cacheKey, baseOption) => {
183
+ const { autoAbort, autoStart, uploadOptions } = useMergeTusOptions(baseOption);
184
+ const { defaultOptions, uploads } = useTusClientState();
185
+ const tusClientDispatch = useTusClientDispatch();
186
+ const setUpload = useCallback((file, options = {}) => {
187
+ const targetOptions = {
188
+ ...defaultOptions?.(file),
189
+ ...uploadOptions,
190
+ ...options,
191
+ };
192
+ const onSuccess = () => {
193
+ tusClientDispatch(updateSuccessUpload(cacheKey));
194
+ targetOptions?.onSuccess?.();
195
+ };
196
+ const onError = (error) => {
197
+ tusClientDispatch(updateErrorUpload(cacheKey, error));
198
+ targetOptions?.onError?.(error);
199
+ };
200
+ const mergedUploadOptions = {
201
+ ...targetOptions,
202
+ onSuccess,
203
+ onError,
204
+ };
205
+ const dispatchIsAborted = (isAborted) => {
206
+ tusClientDispatch(updateIsAbortedUpload(cacheKey, isAborted));
207
+ };
208
+ const upload = createUpload(file, mergedUploadOptions, dispatchIsAborted);
209
+ if (autoStart) {
210
+ startOrResumeUpload(upload);
211
+ }
212
+ tusClientDispatch(insertUploadInstance(cacheKey, upload));
213
+ }, [autoStart, cacheKey, defaultOptions, tusClientDispatch, uploadOptions]);
214
+ const targetTusState = useMemo(() => uploads[cacheKey], [cacheKey, uploads]);
215
+ const remove = useCallback(() => {
216
+ targetTusState?.upload?.abort();
217
+ tusClientDispatch(removeUploadInstance(cacheKey));
218
+ }, [targetTusState, tusClientDispatch, cacheKey]);
219
+ const tusResult = useMemo(() => ({
220
+ upload: targetTusState?.upload,
221
+ isSuccess: targetTusState?.isSuccess ?? false,
222
+ error: targetTusState?.error,
223
+ isAborted: targetTusState?.isAborted ?? false,
224
+ setUpload,
225
+ remove,
226
+ }), [targetTusState, setUpload, remove]);
227
+ useAutoAbort(tusResult.upload, autoAbort ?? false);
228
+ return tusResult;
229
+ };
230
+
231
+ const tusClientReducer = (state, actions) => {
232
+ switch (actions.type) {
233
+ case "INSERT_UPLOAD_INSTANCE": {
234
+ const { cacheKey, uploadState } = actions.payload;
235
+ return {
236
+ ...state,
237
+ uploads: {
238
+ ...state.uploads,
239
+ [cacheKey]: uploadState,
240
+ },
241
+ };
242
+ }
243
+ case "UPDATE_SUCCESS_UPLOAD": {
244
+ const { cacheKey } = actions.payload;
245
+ const target = state.uploads[cacheKey];
246
+ if (!target) {
247
+ return state;
248
+ }
249
+ return {
250
+ ...state,
251
+ uploads: {
252
+ ...state.uploads,
253
+ [cacheKey]: {
254
+ ...(target || {}),
255
+ isSuccess: true,
256
+ },
257
+ },
258
+ };
259
+ }
260
+ case "UPDATE_ERROR_UPLOAD": {
261
+ const { cacheKey, error } = actions.payload;
262
+ const target = state.uploads[cacheKey];
263
+ if (!target) {
264
+ return state;
265
+ }
266
+ return {
267
+ ...state,
268
+ uploads: {
269
+ ...state.uploads,
270
+ [cacheKey]: {
271
+ ...target,
272
+ error,
273
+ },
274
+ },
275
+ };
276
+ }
277
+ case "UPDATE_IS_ABORTED_UPLOAD": {
278
+ const { cacheKey, isAborted } = actions.payload;
279
+ const target = state.uploads[cacheKey];
280
+ if (!target) {
281
+ return state;
282
+ }
283
+ return {
284
+ ...state,
285
+ uploads: {
286
+ ...state.uploads,
287
+ [cacheKey]: {
288
+ ...target,
289
+ isAborted,
290
+ },
291
+ },
292
+ };
293
+ }
294
+ case "REMOVE_UPLOAD_INSTANCE": {
295
+ const { cacheKey } = actions.payload;
296
+ const newUploads = state.uploads;
297
+ delete newUploads[cacheKey];
298
+ return {
299
+ ...state,
300
+ uploads: newUploads,
301
+ };
302
+ }
303
+ case "UPDATE_DEFAULT_OPTIONS": {
304
+ const { defaultOptions } = actions.payload;
305
+ return {
306
+ ...state,
307
+ defaultOptions,
308
+ };
309
+ }
310
+ default:
311
+ return state;
312
+ }
313
+ };
314
+ const tusClientInitialState = {
315
+ uploads: {},
316
+ defaultOptions: undefined,
317
+ };
318
+
319
+ const TusClientProvider = ({ defaultOptions, children, }) => {
320
+ const [tusClientState, tusClientDispatch] = useReducer(tusClientReducer, {
321
+ ...tusClientInitialState,
322
+ defaultOptions,
323
+ });
324
+ // Output error if tus has not supported
325
+ useEffect(() => {
326
+ if (isSupported || process.env.NODE_ENV === "production") {
327
+ return;
328
+ }
329
+ // eslint-disable-next-line no-console
330
+ console.error(ERROR_MESSAGES.tusIsNotSupported);
331
+ }, []);
332
+ // Set defaultOptions to the context
333
+ useEffect(() => {
334
+ if (tusClientState.defaultOptions === defaultOptions) {
335
+ return;
336
+ }
337
+ tusClientDispatch(updateDefaultOptions(defaultOptions));
338
+ }, [defaultOptions, tusClientState.defaultOptions]);
339
+ const tusClientDispatchContextProviderElement = createElement(TusClientDispatchContext.Provider, { value: tusClientDispatch }, children);
340
+ return createElement(TusClientStateContext.Provider, {
341
+ value: tusClientState,
342
+ }, tusClientDispatchContextProviderElement);
343
+ };
344
+
345
+ export { TusClientProvider, useTus, useTusStore };
@@ -1,2 +1,3 @@
1
- export { useTus } from './useTus';
2
- export type { UseTusResult, UseTusOptions } from './types';
1
+ export { useTus } from "./useTus";
2
+ export { useTusStore } from "./useTusStore";
3
+ export type { UseTusResult, UseTusOptions } from "./types";
@@ -1,15 +1,14 @@
1
- import type { Upload } from 'tus-js-client';
2
- export declare type UseTusOptions = {
3
- cacheKey?: string;
4
- autoAbort?: boolean;
5
- autoStart?: boolean;
6
- };
7
- export declare type UseTusResult = {
8
- upload?: Upload;
9
- setUpload: (file: Upload['file'], options?: Upload['options']) => void;
10
- remove: () => void;
11
- isSuccess: boolean;
12
- isAborted: boolean;
13
- error?: Error;
14
- };
15
- export declare type UseTusState = Pick<UseTusResult, 'upload' | 'isSuccess' | 'error' | 'isAborted'>;
1
+ import type { Upload, UploadOptions } from "tus-js-client";
2
+ export interface UseTusOptions {
3
+ autoAbort?: boolean;
4
+ autoStart?: boolean;
5
+ uploadOptions?: UploadOptions;
6
+ }
7
+ export interface UseTusResult {
8
+ upload?: Upload;
9
+ setUpload: (file: Upload["file"], options?: Upload["options"]) => void;
10
+ isSuccess: boolean;
11
+ isAborted: boolean;
12
+ error?: Error;
13
+ remove: () => void;
14
+ }
@@ -1,2 +1,2 @@
1
- import { UseTusOptions, UseTusResult } from './types';
2
- export declare const useTus: (useTusOptions?: UseTusOptions | undefined) => UseTusResult;
1
+ import { UseTusOptions, UseTusResult } from "./types";
2
+ export declare const useTus: (baseOption?: UseTusOptions | undefined) => UseTusResult;
@@ -0,0 +1,2 @@
1
+ import { UseTusOptions, UseTusResult } from "./types";
2
+ export declare const useTusStore: (cacheKey: string, baseOption?: UseTusOptions | undefined) => UseTusResult;
@@ -0,0 +1,3 @@
1
+ import { Upload } from "tus-js-client";
2
+ export declare type DispatchIsAborted = (isAborted: boolean) => void;
3
+ export declare const createUpload: (file: Upload["file"], options: Upload["options"], dispatchIsAborted: DispatchIsAborted) => Upload;
@@ -0,0 +1,2 @@
1
+ import { Upload } from "tus-js-client";
2
+ export declare const startOrResumeUpload: (upload: Upload) => void;
@@ -0,0 +1,2 @@
1
+ import { Upload } from "tus-js-client";
2
+ export declare const useAutoAbort: (upload: Upload | undefined, autoAbort: boolean) => void;
@@ -0,0 +1,6 @@
1
+ import { UseTusOptions } from "../types";
2
+ export declare const useMergeTusOptions: (options: UseTusOptions | undefined) => {
3
+ autoAbort?: boolean | undefined;
4
+ autoStart?: boolean | undefined;
5
+ uploadOptions?: import("tus-js-client").UploadOptions | undefined;
6
+ };
@@ -0,0 +1 @@
1
+ export { useTusClient } from "./useTusClient";
@@ -0,0 +1,7 @@
1
+ export declare const useTusClient: () => {
2
+ state: {
3
+ [cacheKey: string]: import("../TusClientProvider/store/tusClientReducer").UploadState | undefined;
4
+ };
5
+ removeUpload: (cacheKey: string) => void;
6
+ reset: () => void;
7
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "use-tus",
3
- "version": "0.3.0",
3
+ "version": "0.6.0",
4
4
  "description": "React hooks for resumable file uploads using tus-js-client",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -11,8 +11,8 @@
11
11
  "test": "cross-env NODE_ENV=TEST jest",
12
12
  "type": "tsc --noEmit",
13
13
  "format": "npm-run-all -s format:*",
14
- "format:fix": "prettier --write './src/**/*.{ts,tsx,js,jsx,json}'",
15
- "format:lint": "eslint ./src --ext .ts,.tsx",
14
+ "format:fix": "prettier --write './**/*.{ts,tsx,js,jsx,json}'",
15
+ "format:lint": "eslint ./ --ext .ts,.tsx",
16
16
  "clean": "rimraf ./dist",
17
17
  "prepublishOnly": "npm run build",
18
18
  "prepare": "husky install",
@@ -53,6 +53,7 @@
53
53
  "@rollup/plugin-babel": "^5.3.0",
54
54
  "@rollup/plugin-commonjs": "^18.0.0",
55
55
  "@rollup/plugin-node-resolve": "^11.2.1",
56
+ "@rollup/plugin-typescript": "^8.3.0",
56
57
  "@storybook/addon-actions": "^6.2.9",
57
58
  "@storybook/addon-essentials": "^6.2.9",
58
59
  "@storybook/addon-links": "^6.2.9",
@@ -90,15 +91,14 @@
90
91
  "react-dom": "^17.0.2",
91
92
  "rimraf": "^3.0.2",
92
93
  "rollup": "^2.44.0",
93
- "rollup-plugin-typescript2": "^0.30.0",
94
94
  "tailwindcss": "npm:@tailwindcss/postcss7-compat",
95
95
  "ts-jest": "^26.5.4",
96
- "typescript": "^4.2.3"
96
+ "typescript": "^4.2.3",
97
+ "tus-js-client": "^2.2.0"
97
98
  },
98
99
  "peerDependencies": {
99
- "react": "^16.8.0 || ^17.0.0"
100
- },
101
- "dependencies": {
100
+ "react": "^16.8.0 || ^17.0.0",
102
101
  "tus-js-client": "^2.2.0"
103
- }
102
+ },
103
+ "dependencies": {}
104
104
  }
@@ -1,4 +0,0 @@
1
- import { FC } from 'react';
2
- import { TusConfigs } from '../core/tusHandler';
3
- export declare type TusControllerProps = Readonly<TusConfigs>;
4
- export declare const TusController: FC<TusControllerProps>;
@@ -1,4 +0,0 @@
1
- export declare const ERROR_MESSAGES: {
2
- tusClientHasNotFounded: string;
3
- tusIsNotSupported: string;
4
- };
@@ -1,17 +0,0 @@
1
- import * as tus from 'tus-js-client';
2
- import { Upload } from 'tus-js-client';
3
- export declare type DefaultOptions = (file: Upload['file']) => tus.UploadOptions;
4
- export declare type TusConfigs = Partial<{
5
- canStoreURLs: boolean;
6
- defaultOptions: DefaultOptions;
7
- }>;
8
- export declare type Tus = Readonly<Omit<typeof tus, 'defaultOptions'> & Required<TusConfigs>>;
9
- export declare const initialDefaultOptions: DefaultOptions;
10
- export declare class TusHandler {
11
- private tus;
12
- constructor(tusConfigs?: TusConfigs);
13
- get getTus(): Readonly<Omit<typeof tus, "defaultOptions"> & Required<Partial<{
14
- canStoreURLs: boolean;
15
- defaultOptions: DefaultOptions;
16
- }>>>;
17
- }
@@ -1,8 +0,0 @@
1
- import { Upload } from 'tus-js-client';
2
- export declare type BaseUseTusResult = {
3
- upload?: Upload;
4
- setUpload: (file: Upload['file'], options?: Upload['options']) => void;
5
- isSuccess: boolean;
6
- error?: Error;
7
- };
8
- export declare type BaseUseTusOptions = {};
@@ -1,16 +0,0 @@
1
- import { SetStateAction } from 'react';
2
- import { Upload } from 'tus-js-client';
3
- import { TusClientActions } from '../core/tucClientActions';
4
- import { UseTusOptions, UseTusState } from './types';
5
- export declare type Dispatcher = {
6
- dispatch: (value: TusClientActions) => void;
7
- internalDispatch: (value: SetStateAction<UseTusState>) => void;
8
- cacheKey: UseTusOptions['cacheKey'];
9
- };
10
- declare type OptionHandler = Pick<Upload['options'], 'onError' | 'onSuccess'>;
11
- declare type CreateUpload = (file: Upload['file'], options: Upload['options'], dispatcher: Dispatcher) => Upload;
12
- declare type CreateOptionHandler = (handlers: OptionHandler, dispatcher: Dispatcher) => OptionHandler;
13
- export declare const createOptionHandler: CreateOptionHandler;
14
- export declare const startOrResumeUpload: (upload: Upload) => void;
15
- export declare const createUpload: CreateUpload;
16
- export {};
@@ -1 +0,0 @@
1
- export declare const createUid: () => string;