Skip to content

Commit

Permalink
ValkyrieFileController: FileMetadata ID might not match StreamFile
Browse files Browse the repository at this point in the history
  • Loading branch information
dunn committed May 18, 2022
1 parent 2962370 commit c1475c9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/controllers/hyrax/valkyrie_file_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ module Hyrax
class ValkyrieFileController < ApplicationController
def show
begin
file = storage_adapter.find_by(id: params[:id])
metadata = Hyrax.query_service.find_by(id: params[:id])
file = storage_adapter.find_by(id: metadata.file_identifier)
rescue => e
return render plain: e.message, status: :not_found
end
Expand Down

0 comments on commit c1475c9

Please sign in to comment.