whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [whimsy] branch master updated: Document why code converts each byte separately
Date Mon, 10 Sep 2018 23:47:37 GMT
This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new e07669f  Document why code converts each byte separately
e07669f is described below

commit e07669f4f9824f0e6836a46f3890e92879d4ab81
Author: Sebb <sebb@apache.org>
AuthorDate: Tue Sep 11 00:47:35 2018 +0100

    Document why code converts each byte separately
---
 www/board/agenda/views/buttons/post.js.rb | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/www/board/agenda/views/buttons/post.js.rb b/www/board/agenda/views/buttons/post.js.rb
index 4a6f5b9..39a2f4d 100644
--- a/www/board/agenda/views/buttons/post.js.rb
+++ b/www/board/agenda/views/buttons/post.js.rb
@@ -551,6 +551,10 @@ class Post < Vue
 
     reader = FileReader.new
     def reader.onload(event)
+      # Convert the spreadsheet a byte at a time because
+      # Chrome Javascript did not handle the following properly:
+      # String.fromCharCode(*Uint8Array.new(event.target.result))
+      # See commit 46058b1e8baff80c75ea72f5b79f2f23af2e87a5
       bytes = Uint8Array.new(event.target.result)
       binary = ''
       for i in 0...bytes.byteLength


Mime
View raw message