File tree Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 22ChangeLog
33*********
44
5+ 0.20.1 (2017-03-02)
6+ ===================
7+ - Fix: Cast OSF file size metadata to an int before comparing to our maximum supported file size
8+ limit. Some providers return file size as a string instead of int.
9+
5100.20.0 (2017-03-01)
611===================
712- The "(thanks, @johnetordoff!)" release
Original file line number Diff line number Diff line change 1- __version__ = '0.20.0 '
1+ __version__ = '0.20.1 '
22__import__ ('pkg_resources' ).declare_namespace (__name__ )
Original file line number Diff line number Diff line change @@ -102,12 +102,12 @@ async def metadata(self):
102102 size = metadata ['data' ]['size' ]
103103
104104 max_file_size = MAX_FILE_SIZE_TO_RENDER .get (ext )
105- if max_file_size and size and size > max_file_size :
105+ if max_file_size and size and int ( size ) > max_file_size :
106106 raise TooBigToRenderError (
107107 "This file with extension '{ext}' exceeds the size limit of {max_size} and will not "
108108 "be rendered. To view this file download it and view it "
109109 "offline." .format (ext = ext , max_size = sizeof_fmt (max_file_size )),
110- requested_size = size , maximum_size = max_file_size ,
110+ requested_size = int ( size ) , maximum_size = max_file_size ,
111111 )
112112
113113 content_type = metadata ['data' ]['contentType' ] or mimetypes .guess_type (metadata ['data' ]['name' ])[0 ]
You can’t perform that action at this time.
0 commit comments