Skip to content

Commit

Permalink
404 on missing files
Browse files Browse the repository at this point in the history
  • Loading branch information
jcraigk committed Oct 11, 2024
1 parent 38c19d8 commit ecf017a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/controllers/downloads_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ def send_audio_file_as_attachment
disposition: "attachment",
filename: "Phish #{track.show.date} #{track.title}.mp3",
length: track.audio_file.size
rescue ActionController::MissingFile
head :not_found
end

def send_blob_file_inline
Expand All @@ -28,6 +30,8 @@ def send_blob_file_inline
disposition: "inline",
filename: blob.filename.to_s,
length: blob.byte_size
rescue ActionController::MissingFile
head :not_found
end

def track
Expand Down

0 comments on commit ecf017a

Please sign in to comment.