Skip to content

Commit

Permalink
Merge pull request #26 from sul-dlss/remove-identifier-from-download-…
Browse files Browse the repository at this point in the history
…filename

remove identifier from downloaded filename
  • Loading branch information
Jessie Keck committed Apr 4, 2016
2 parents 046a08d + f4f0e86 commit 7999132
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/controllers/iiif_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def set_image_response_headers
end

def set_attachment_content_disposition_header
response.headers['Content-Disposition'] = "attachment;filename=#{params[:identifier]}.#{params[:format]}"
response.headers['Content-Disposition'] = "attachment;filename=#{identifier_params[:file_name]}.#{params[:format]}"
end

def load_image
Expand Down
2 changes: 1 addition & 1 deletion spec/controllers/iiif_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
end

it 'sets the preferred filename' do
expect(subject.headers['Content-Disposition']).to include 'filename=nr349ct7889%2Fnr349ct7889_00_0001.jpg'
expect(subject.headers['Content-Disposition']).to include 'filename=nr349ct7889_00_0001.jpg'
end
end
end
Expand Down

0 comments on commit 7999132

Please sign in to comment.