Skip to content

Commit

Permalink
fix url
Browse files Browse the repository at this point in the history
  • Loading branch information
JoaoFelipe committed Oct 31, 2023
1 parent 3f62120 commit 9241131
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class Admissions::FilledFormFieldsController < ApplicationController

def download
record = Admissions::FilledFormField.find params[:id]
if record.blank? || record.file.url != request.fullpath
if record.blank? || !request.original_url.end_with?(record.file.url)
raise ActionController::RoutingError.new("Não encontrado")
end
send_data(record.file.read, filename: record.file.filename)
Expand Down

0 comments on commit 9241131

Please sign in to comment.