Class: Dspace::Resources::BitstreamResource
- Inherits:
-
ResourceKit::Resource
- Object
- ResourceKit::Resource
- Dspace::Resources::BitstreamResource
- Defined in:
- lib/dspace/resources/bitstream_resource.rb
Instance Method Summary collapse
Instance Method Details
#retrieve(args = {}) ⇒ Object
56 57 58 59 60 61 |
# File 'lib/dspace/resources/bitstream_resource.rb', line 56 def retrieve(args={}) bitstreams_path = args.fetch(:bitstreams_path, nil) bitstream = ResourceKit::ActionInvoker.call(action(:find), self, id: args.fetch(:id)) return nil if bitstream.is_a? String Dspace::Builders::TempfileBuilder.build(bitstream_filename(bitstream), ResourceKit::ActionInvoker.call(action(:retrieve), self, id: bitstream.id), bitstreams_path) end |