Commit 3cd4b476 authored by Mateus Rambo Strey's avatar Mateus Rambo Strey

fix bitstream retrieve

parent 282d9521
......@@ -4,7 +4,7 @@ module Dspace
def self.build(filename, contents = nil)
file = Tempfile.new([sanitize_filename(filename), File.extname(filename)]).tap do |f|
f.write contents
f.write contents.force_encoding("UTF-8")
f.close
end
end
......@@ -23,4 +23,4 @@ module Dspace
end
end
end
\ No newline at end of file
end
......@@ -55,9 +55,9 @@ module Dspace
def retrieve(args={})
bitstream = ResourceKit::ActionInvoker.call(action(:find), self, id: args.fetch(:id))
Dspace::Builders::TempfileBuilder.build(bitstream.name, ResourceKit::ActionInvoker.call(action(:retrieve), self))
Dspace::Builders::TempfileBuilder.build(bitstream.name, ResourceKit::ActionInvoker.call(action(:retrieve), self, id: bitstream.id))
end
end
end
end
\ No newline at end of file
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment