@leogps/file-uploader 2.0.3 → 2.0.4
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.
- package/README.md +13 -10
- package/dist/client/index.html +1 -1
- package/dist/client/{main.5f2a69fd2944bb03bad4.bundle.js → main.5b512c69d6a84b326aa0.bundle.js} +395 -321
- package/dist/index.js +1 -1
- package/package.json +5 -2
- package/scripts/inject-version.js +23 -0
- package/src/globals.ts +57 -29
- package/src/index.ts +59 -37
- package/src/routes/config.ts +15 -0
- package/src/routes/upload.ts +6 -7
- package/src/routes/uploadChunk.ts +3 -3
- package/src/routes/uploadInit.ts +6 -7
- package/src-client/entrypoint.ts +127 -23
- package/tsconfig.dev.json +11 -0
- package/webpack-client.common.js +0 -5
- package/webpack-client.dev.js +8 -0
- package/webpack-client.prod.js +8 -0
- package/webpack.config.js +6 -2
package/README.md
CHANGED
|
@@ -5,9 +5,11 @@ Zero-config command-line tool to run a file-uploader server. Files can be upload
|
|
|
5
5
|
Both Server and Client are written in JS.
|
|
6
6
|
|
|
7
7
|
## Features
|
|
8
|
+
- Parallel file uploads
|
|
9
|
+
- Number of files to upload simultaneously can be configured `-N | --parallel-file-uploads`
|
|
8
10
|
- Chunked/Resumable uploads
|
|
9
11
|
- Chunk size is configurable `-s | --chunk-size`
|
|
10
|
-
- Number of Parallel uploads are configurable `-n | --parallel-uploads`
|
|
12
|
+
- Number of Parallel uploads are configurable `-n | --parallel-chunk-uploads`
|
|
11
13
|
- Uses SHA1 verification to ensure chunks are valid
|
|
12
14
|
- Optionally disable resumable uploads
|
|
13
15
|
|
|
@@ -45,17 +47,18 @@ with the provided Dockerfile.
|
|
|
45
47
|
|
|
46
48
|
### Usage
|
|
47
49
|
|
|
48
|
-
file-uploader [path] [options]
|
|
50
|
+
🚀file-uploader [path] [options]
|
|
49
51
|
|
|
50
52
|
Options:
|
|
51
|
-
-l, --upload-location
|
|
52
|
-
-p, --port
|
|
53
|
-
-s, --chunk-size
|
|
54
|
-
-
|
|
55
|
-
-
|
|
56
|
-
-
|
|
57
|
-
--
|
|
58
|
-
--
|
|
53
|
+
-l, --upload-location upload location [string] [default: "/Users/<username>/uploads/"]
|
|
54
|
+
-p, --port server port [number] [default: 8082]
|
|
55
|
+
-s, --chunk-size chunk size in bytes [number] [default: 512 KiB]
|
|
56
|
+
-N, --parallel-file-uploads number of simultaneous parallel file uploads [number] [default: 3]
|
|
57
|
+
-n, --parallel-chunk-uploads number of simultaneous parallel chunk uploads (per file) [number] [default: 10]
|
|
58
|
+
-c, --enable-compression enable gzip compression (server to client responses) [boolean] [default: true]
|
|
59
|
+
-m, --max-file-size maximum file size in bytes [number] [default: 100 GiB]
|
|
60
|
+
--version Show version number [boolean]
|
|
61
|
+
--help Show help [boolean]
|
|
59
62
|
|
|
60
63
|
# Development
|
|
61
64
|
|
package/dist/client/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"><title>File Uploader!</title><link rel="icon" href="favicon.ico"><script defer="defer" src="main.
|
|
1
|
+
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"><title>File Uploader!</title><link rel="icon" href="favicon.ico"><script defer="defer" src="main.5b512c69d6a84b326aa0.bundle.js"></script><link href="main.6db272040eaab1c51019.css" rel="stylesheet"></head><body><div class="content m-2"><div class="fixed-grid container has-4-columns mt-4"><div class="grid"><div class="cell is-col-span-2"><section><div>Hello there from file-uploader server.</div><div><code class="">File Uploader,</code> you know for file uploads.</div></section></div><div class="cell is-col-from-end-1"><section class="mt-4 m-2 is-pulled-right mr-6"><div class="is-position-absolute bulma-is-fixed-top is-clickable" id="themeToggle"><i class="fas fa-moon" id="themeIcon"></i></div></section></div></div></div><div class="container is-one-third"><form id="uploadForm" action="/upload" enctype="multipart/form-data" method="post"><div id="file-div" class="field file has-name is-boxed column is-flex-grow-1"><label class="file-label"><input class="file-input" type="file" name="file" multiple="multiple"> <span class="file-cta"><span class="file-icon"><i class="fas fa-upload"></i> </span><span class="file-label">Choose file(s)…</span></span></label><div id="file-name" class="mt-1 wrap-text is-multiline"></div></div><div class="field"><label class="checkbox"><input id="disableChunkedUpload" type="checkbox"> <span>Disable chunked/resumable upload</span></label></div><div class="control field is-flex-grow-1"><button type="submit" class="button is-link">Submit</button></div></form></div><hr class="is-one-third"/><div class="container"><section class="m-2 is-one-third"><h4>Progress:</h4><div class="all-progress-detail-control control field is-flex-grow-1 is-active p-1 is-hidden"><button type="button" class="button is-link">Collapse All</button></div><div class="container" id="progress-container"></div></section></div></div></body></html>
|