app/controllers/download_controller.rb in geoblacklight-1.8.0 vs app/controllers/download_controller.rb in geoblacklight-1.9.0

- old
+ new

@@ -30,11 +30,11 @@ def file # Grab the solr document to check if it should be public or not @response, @document = fetch(file_name_to_id(params[:id])) restricted_should_authenticate - send_file download_file_path_and_name, type: 'application/zip', x_sendfile: true + send_file download_file_path_and_name, x_sendfile: true end def hgl @response, @document = fetch params[:id] if params[:email] @@ -59,10 +59,10 @@ # Creates an error flash message with failed download url # @param [Geoblacklight::Exceptions::ExternalDownloadFailed] Download failed # exception # @return [String] error message to display in flash def flash_error_message(exception) - if exception.url + if exception.url.present? message = t('geoblacklight.download.error_with_url', link: view_context .link_to(exception.url, exception.url, target: 'blank'))