diff --git a/app/controllers/content_controller.rb b/app/controllers/content_controller.rb index dfed2e418..5c78cd26f 100644 --- a/app/controllers/content_controller.rb +++ b/app/controllers/content_controller.rb @@ -5,13 +5,13 @@ class ContentController < ApplicationController end def read - location = druid_tools.path(params[:path]) - + location = druid_tools.find(:content, params[:path]) + return render status: :not_found unless location send_file location end def list - location = druid_tools.path + location = druid_tools.content_dir(false) raise ActionController::MissingFile, location unless Dir.exist? location diff --git a/spec/fixtures/dor_workspace/ab/123/cd/4567/ab123cd4567/a b/spec/fixtures/dor_workspace/ab/123/cd/4567/ab123cd4567/content/a similarity index 100% rename from spec/fixtures/dor_workspace/ab/123/cd/4567/ab123cd4567/a rename to spec/fixtures/dor_workspace/ab/123/cd/4567/ab123cd4567/content/a