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: Must use binary read
Date Mon, 22 Oct 2018 01:17:54 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 b962593  Must use binary read
b962593 is described below

commit b962593ccdf1e2e1f196bc1bf34beab208352ede
Author: Sebb <sebb@apache.org>
AuthorDate: Mon Oct 22 02:17:53 2018 +0100

    Must use binary read
    
    Otherwise may get UTF-8 errors
---
 www/secretary/workbench/views/actions/burst.json.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/www/secretary/workbench/views/actions/burst.json.rb b/www/secretary/workbench/views/actions/burst.json.rb
index c0065f9..817c475 100644
--- a/www/secretary/workbench/views/actions/burst.json.rb
+++ b/www/secretary/workbench/views/actions/burst.json.rb
@@ -21,7 +21,7 @@ begin
     pages.each_with_index do |page, index|
       attachments << {
         name: format % (index+1),
-        content: File.read(page),
+        content: File.binread(page), # must use binary read
         mime: 'application/pdf'
       } if File.size? page # skip empty output files
     end


Mime
View raw message