about summary refs log tree commit diff stats
path: root/src/html/formdata.nim
diff options
context:
space:
mode:
Diffstat (limited to 'src/html/formdata.nim')
-rw-r--r--src/html/formdata.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/html/formdata.nim b/src/html/formdata.nim
index c14a36ab..335e36b6 100644
--- a/src/html/formdata.nim
+++ b/src/html/formdata.nim
@@ -1,9 +1,9 @@
-import std/base64
 import std/streams
 
 import html/catom
 import html/dom
 import html/enums
+import js/base64
 import js/domexception
 import js/javascript
 import js/tojs
@@ -21,7 +21,7 @@ proc generateBoundary(): string =
   let s = urandom.readStr(32)
   urandom.close()
   # 32 * 4 / 3 (padded) = 44 + prefix string is 22 bytes = 66 bytes
-  return "----WebKitFormBoundary" & base64.encode(s)
+  return "----WebKitFormBoundary" & btoa(s)
 
 proc newFormData0*(): FormData =
   return FormData(boundary: generateBoundary())