mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 15:25:35 +08:00
DEV: Better error handling for s3 task
This commit is contained in:
parent
cbb27241c4
commit
9ec908950d
|
@ -71,7 +71,12 @@ def assets
|
|||
manifest.assets.each do |_, path|
|
||||
fullpath = (Rails.root + "public/assets/#{path}").to_s
|
||||
|
||||
content_type = MiniMime.lookup_by_filename(fullpath).content_type
|
||||
mime = MiniMime.lookup_by_filename(fullpath)
|
||||
if mime.nil?
|
||||
STDERR.puts "ERROR: could not determine mime type for #{fullpath}"
|
||||
end
|
||||
|
||||
content_type = mime.content_type
|
||||
|
||||
asset_path = "assets/#{path}"
|
||||
results << [fullpath, asset_path, content_type]
|
||||
|
|
Loading…
Reference in New Issue
Block a user