Skip to content

Commit

Permalink
Merge pull request #177 from sul-dlss/content-dir
Browse files Browse the repository at this point in the history
The ContentController should operate out of the content directory
  • Loading branch information
mjgiarlo committed Dec 14, 2018
2 parents 204146e + cdb9064 commit 3ac3b82
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/controllers/content_controller.rb
Expand Up @@ -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

Expand Down

0 comments on commit 3ac3b82

Please sign in to comment.