Increase size limit for display of html files to 10000000 bytes - mirdeep2 creates very large html objects.

Size limit for display should probably be configurable.
This commit is contained in:
Ross Lazarus
2011-10-04 09:38:33 +11:00
parent 4770146fad
commit f8261fe806
+2
View File
@@ -376,6 +376,8 @@ class DatasetInterface( BaseUIController, UsesAnnotations, UsesHistory, UsesHist
raise paste.httpexceptions.HTTPNotFound( "File Not Found (%s)." % data.file_name )
max_peek_size = 1000000 # 1 MB
if isinstance(data.datatype, datatypes.images.Html):
max_peek_size = 10000000 # 10 MB for html
if not preview or isinstance(data.datatype, datatypes.images.Image) or os.stat( data.file_name ).st_size < max_peek_size:
return open( data.file_name )
else: