Finished improving rendering of UUIDs for now.
[arvados.git] / apps / workbench / app / controllers / collections_controller.rb
index a5fed9d9a368cbc7194d4db2b50e7cd2de19de62..5d5eb79e520996ed53dc6a2afa4d76fbabdbcaea 100644 (file)
@@ -1,5 +1,6 @@
 class CollectionsController < ApplicationController
   skip_before_filter :find_object_by_uuid, :only => [:graph]
+  skip_before_filter :check_user_agreements, :only => [:show_file]
 
   def graph
     index
@@ -48,6 +49,8 @@ class CollectionsController < ApplicationController
     end
     self.response.headers['Content-Type'] =
       Rack::Mime::MIME_TYPES[ext] || 'application/octet-stream'
+    self.response.headers['Content-Length'] = params[:size] if params[:size]
+    self.response.headers['Content-Disposition'] = params[:disposition] if params[:disposition]
     self.response_body = FileStreamer.new opts
   end
 
@@ -121,7 +124,7 @@ class CollectionsController < ApplicationController
           yield buf
         end
       end
-      Rails.logger.warn("#{@opts[:uuid]}/#{@opts[:file]}: $?") if $? != 0
+      Rails.logger.warn("#{@opts[:uuid]}/#{@opts[:file]}: #{$?}") if $? != 0
     end
   end
 end