app/controllers/downloads_controller.rb
def derivative_download_options
      if params[:dl].present?
        return {
          type: mime_type_for(file),
          filename: file_name,
          disposition: "attachment",
        }
      end

      super
    end
# set the disposition to attachment for downloading
set the disposition to attachment for downloading
set the disposition to attachment for downloading
def derivative_download_options
      if params[:dl].present?
        return {
          type: mime_type_for(file),
          filename: file_name,
          disposition: "attachment",
        }
      end
      super
    end
def derivative_download_options if params [ :dl ] . present? return { type : mime_type_for ( file ) , filename : file_name , disposition : "attachment" , } end super end
set the disposition to attachment for downloading
set the disposition to attachment for downloading