MCPcopy
hub / github.com/transloadit/uppy / createUppy

Function createUppy

packages/@uppy/xhr-upload/src/xhrUpload.browser.test.ts:20–35  ·  view source on GitHub ↗
({ bundle = false }: { bundle?: boolean } = {})

Source from the content-addressed store, hash-verified

18let uppy: Uppy | undefined
19
20function createUppy({ bundle = false }: { bundle?: boolean } = {}) {
21 const target = document.createElement('div')
22 document.body.appendChild(target)
23
24 uppy = new Uppy({ debug: true })
25 .use(Dashboard, {
26 target,
27 inline: true,
28 })
29 .use(XHRUpload, {
30 endpoint: 'http://localhost/upload',
31 bundle,
32 })
33
34 return uppy
35}
36
37function createMockFile(name: string, size: number = 16) {
38 return new File(['a'.repeat(size)], name, { type: 'text/plain' })

Callers 1

Calls 1

useMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…