You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Attempting to upload a ::File using the fedora storage adapter fails with Content-Length not given and Transfer-Encoding is not 'chunked' coming from Net::HTTP. The Content-Length header does not get set because ::File does not have a #length method (only #size) and the storage adapter #upload_file method only checks for #size.
The specs use a Tempfile which does have a length alias for size.
Expected behavior: A ::File passed to Valkyrie::Storage::Fedora#upload_file uploads to fedora successfully.
Actual behavior: ArgumentError: Content-Length not given and Transfer-Encoding is not 'chunked'
The text was updated successfully, but these errors were encountered:
dlpierce
added a commit
to samvera/hyrax
that referenced
this issue
Sep 26, 2023
* Use StreamFile#disk_path instead of io directly
The Fedora storage adapter sets io to be an IOProxy which basename cannot make use of.
* Do not use shovel operator << when setting ids
The Fedora metadata adapter provides frozen empty arrays as default values. It is unknown why the Postgres adapter defaults are unfrozen.
* Patch File to workaround samvera/valkyrie#936
* Add config for valkyrie fedora faraday connection
* Rubocop
Attempting to upload a
::File
using the fedora storage adapter fails withContent-Length not given and Transfer-Encoding is not 'chunked'
coming from Net::HTTP. The Content-Length header does not get set because ::File does not have a #length method (only #size) and the storage adapter #upload_file method only checks for #size.The specs use a Tempfile which does have a length alias for size.
Expected behavior: A ::File passed to Valkyrie::Storage::Fedora#upload_file uploads to fedora successfully.
Actual behavior: ArgumentError: Content-Length not given and Transfer-Encoding is not 'chunked'
The text was updated successfully, but these errors were encountered: