details: http://www.bx.psu.edu/hg/galaxy/rev/2b6910fd7d93 changeset: 3607:2b6910fd7d93 user: Kanwei Li <kanwei@gmail.com> date: Fri Apr 02 16:48:35 2010 -0400 description: Only preview for non-binary files. Closes #283 diffstat: lib/galaxy/web/controllers/dataset.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r f2b6d4f3189c -r 2b6910fd7d93 lib/galaxy/web/controllers/dataset.py --- a/lib/galaxy/web/controllers/dataset.py Fri Apr 02 16:06:43 2010 -0400 +++ b/lib/galaxy/web/controllers/dataset.py Fri Apr 02 16:48:35 2010 -0400 @@ -352,7 +352,7 @@ return open( data.file_name ) if os.path.exists( data.file_name ): max_peek_size = 1000000 # 1 MB - if preview and os.stat( data.file_name ).st_size > max_peek_size: + if preview and (not isinstance(data.datatype, datatypes.binary.Binary)) and os.stat( data.file_name ).st_size > max_peek_size: trans.response.set_content_type( "text/html" ) return trans.stream_template_mako( "/dataset/large_file.mako", truncated_data = open( data.file_name ).read(max_peek_size),