valkyrie
valkyrie copied to clipboard
Fedora adapter(s) should support streaming binary content
Binary content can easily be larger than memory, so streaming is a crucial feature. If Faraday doesn't support streaming (https://github.com/lostisland/faraday/pull/604), then we should fall back on Net::HTTP or something else that does for this (e.g., https://github.com/samvera/active_fedora/blob/master/lib/active_fedora/file/streaming.rb).
Looks like Faraday supports streamed requests now.
This ticket is complete when I can download a file that is larger than the memory of the server running the Valkyrie application
upload
needs to use a block to send chunks of uploads, instead of reading the file into memory with tempfile.read
: https://github.com/samvera-labs/valkyrie/blob/master/lib/valkyrie/storage/fedora.rb#L39