Fix backend code for searching by a filetype as a combination of uploads and topic links. Add rspec test for extracting file extension in upload.

This commit is contained in:
Jakub Macina
2017-07-04 17:50:08 +02:00
parent f0a674d620
commit 8c445e9f17
4 changed files with 11 additions and 6 deletions

View File

@ -95,7 +95,7 @@ module FileStore
end
def get_path_for_upload(upload)
get_path_for("original".freeze, upload.id, upload.sha1, upload.extension)
get_path_for("original".freeze, upload.id, upload.sha1, File.extname(upload.original_filename))
end
def get_path_for_optimized_image(optimized_image)