mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
maintain exact old behavior
This commit is contained in:
parent
719f558746
commit
0c267e5952
1 changed files with 1 additions and 0 deletions
|
@ -30,6 +30,7 @@ class UploadsController < ApplicationController
|
|||
RailsMultisite::ConnectionManagement.with_connection(params[:site]) do |db|
|
||||
return render_404 unless Discourse.store.internal?
|
||||
return render_404 if SiteSetting.prevent_anons_from_downloading_files && current_user.nil?
|
||||
return render_404 if SiteSetting.login_required? && db == "default" && current_user.nil?
|
||||
|
||||
if upload = Upload.find_by(sha1: params[:sha]) || Upload.find_by(id: params[:id], url: request.env["PATH_INFO"])
|
||||
opts = { filename: upload.original_filename }
|
||||
|
|
Loading…
Reference in a new issue