index : worker-pastebin

A toy pastebin on Cloudflare Workers with E2EE, React frontend and S3-compatible storage backend

diff options
context:
space:
mode:
authorPeter Cai <[email protected]>2020-02-20 16:07:58 +0800
committerPeter Cai <[email protected]>2020-02-20 16:08:10 +0800
commitddb6eee9e80baa58bbcc79e75ee812e0777e7343 (patch)
tree1ecf2a5c828a17fca773649613636a9e1df0bcae
parentb4dfeb8624f31672ca3a36540d49784883ef12ce (diff)
downloadworker-pastebin-ddb6eee9e80baa58bbcc79e75ee812e0777e7343.tar.gz
fix progressText
-rw-r--r--src/util.coffee5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/util.coffee b/src/util.coffee
index 3994203..a05c151 100644
--- a/src/util.coffee
+++ b/src/util.coffee
@@ -65,8 +65,9 @@ isBrowser = (req) ->
# Process progress text
progressText = (progress) ->
- txt = (progress * 100).toFixed(2) + "%"
- if progress < 0.1
+ progress = progress * 100
+ txt = progress.toFixed(2) + "%"
+ if progress < 10
"0" + txt
else
txt