fix: disable local storage by using NoopUrlStorage

This commit is contained in:
Derrick Hammer 2024-03-29 12:05:46 -04:00
parent cd49a5977e
commit eea567d89e
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 2 additions and 1 deletions

View File

@ -1,4 +1,5 @@
import Uppy, { debugLogger, FailedUppyFile, type State, type UppyFile } from "@uppy/core"; import Uppy, { debugLogger, FailedUppyFile, type State, type UppyFile } from "@uppy/core";
import NoopUrlStorage from "tus-js-client/lib.es5/noopUrlStorage.js";
import Tus from "@uppy/tus"; import Tus from "@uppy/tus";
import toArray from "@uppy/utils/lib/toArray"; import toArray from "@uppy/utils/lib/toArray";
@ -170,7 +171,7 @@ export function useUppy() {
}); });
if (useTus) { if (useTus) {
uppy.use(Tus, { limit: 1, parallelUploads: 1, chunkSize: 1024 * 1024 }); uppy.use(Tus, { limit: 1, parallelUploads: 1, chunkSize: 1024 * 1024, urlStorage: new NoopUrlStorage() });
uppy.addPreProcessor(tusPreprocessor); uppy.addPreProcessor(tusPreprocessor);
} }