diff --git a/app/controllers/yiff_rest/api_v2/images_controller.rb b/app/controllers/yiff_rest/api_v2/images_controller.rb index 7f0cf61..cccd787 100644 --- a/app/controllers/yiff_rest/api_v2/images_controller.rb +++ b/app/controllers/yiff_rest/api_v2/images_controller.rb @@ -66,7 +66,7 @@ module YiffRest @sp[:image_id] ||= @sp[:md5] @sc = (@sp[:score_cutoff].presence || 60).to_i if @sp[:file].present? - @results = Iqdb.query_file(@sp[:file], @sc) + @results = Iqdb.query_file(@sp[:file].tempfile, @sc) elsif @sp[:url].present? @results = Iqdb.query_url(@sp[:url], @sc) elsif @sp[:image_id].present?