[ARVADOS] updated: 894c4a571db991081019c10b8075b8142ad8ec60

Git user git at public.curoverse.com
Thu Jul 20 11:58:29 EDT 2017


Summary of changes:
 apps/workbench/app/helpers/collections_helper.rb | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

       via  894c4a571db991081019c10b8075b8142ad8ec60 (commit)
      from  40e2b5dfa4de9d3f8bdbe01296f7e70b87c2446c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 894c4a571db991081019c10b8075b8142ad8ec60
Author: radhika <radhika at curoverse.com>
Date:   Thu Jul 20 11:58:02 2017 -0400

    11995: check for cwl file type
    
    Arvados-DCO-1.1-Signed-off-by: Radhika Chippada <radhika at curoverse.com>

diff --git a/apps/workbench/app/helpers/collections_helper.rb b/apps/workbench/app/helpers/collections_helper.rb
index 5ae6166..f5f5485 100644
--- a/apps/workbench/app/helpers/collections_helper.rb
+++ b/apps/workbench/app/helpers/collections_helper.rb
@@ -62,11 +62,13 @@ module CollectionsHelper
   # Check if collection preview is allowed for the given filename with extension
   #
   def preview_allowed_for file_name
-    return true if file_name.downcase.end_with?('.cwl') # unknown mime type, but we want to offer preview
-
     file_type = MIME::Types.type_for(file_name).first
     if file_type.nil?
-      false
+      if file_name.downcase.end_with?('.cwl') # unknown mime type, but we support preview
+        true
+      else
+        false
+      end
     elsif (file_type.raw_media_type == "text") || (file_type.raw_media_type == "image")
       true
     elsif (file_type.raw_media_type == "application") &&

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list