This commit is contained in:
Albert Yi
2018-07-25 11:04:50 -07:00
parent 9082ddf455
commit 77854349e5
6 changed files with 37 additions and 22 deletions

View File

@@ -5,7 +5,7 @@ class UploadService
if Utils.is_downloadable?(url) && file.nil?
download = Downloads::File.new(url)
normalized_url, _, _ = download.before_download(url, {})
normalized_url = download.rewrite_url()
post = if normalized_url.nil?
Post.where("SourcePattern(lower(posts.source)) = ?", url).first
else