From de7db729039c41a6f4a016f61c2c721585e5fe01 Mon Sep 17 00:00:00 2001 From: "Paulo Ricardo [PR]" Date: Wed, 6 Jan 2016 18:18:35 -0200 Subject: [PATCH] aparentemente corrige erro de encoding ao ler o favicon.ico no upload --- flask_s3.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flask_s3.py b/flask_s3.py index 9000b16..5a18580 100644 --- a/flask_s3.py +++ b/flask_s3.py @@ -245,7 +245,7 @@ def _write_files(s3, app, static_url_loc, static_folder, files, bucket, logger.warn("Unable to detect mimetype for %s" % file_path) - with open(file_path) as fp: + with open(file_path, 'rb') as fp: metadata, params = split_metadata_params(merge_two_dicts(app.config['FLASKS3_HEADERS'], h)) if per_file_should_gzip: compressed = StringIO()