lib/hydra/derivatives/jpeg2k_image.rb in hydra-derivatives-1.2.0 vs lib/hydra/derivatives/jpeg2k_image.rb in hydra-derivatives-1.2.1

- old
+ new

@@ -28,10 +28,10 @@ def encode_file(dest_path, recipe, opts={}) output_file = self.class.tmp_file('.jp2') if opts[:file_path] self.class.encode(opts[:file_path], recipe, output_file) else - source_file.to_tempfile do |f| + Hydra::Derivatives::TempfileService.create(source_file) do |f| self.class.encode(f.path, recipe, output_file) end end out_file = File.open(output_file, "rb") object.add_file(out_file.read, path: dest_path, mime_type: 'image/jp2')