olca-modules icon indicating copy to clipboard operation
olca-modules copied to clipboard

Binaries are not properly imported when merging to a database.

Open francoislerall opened this issue 9 months ago • 0 comments

When merging a remote repository to a database, the binary files are not properly imported. A file with the proper name can be found in the database binary folder, but the content of the file is the dataset JSON instead of the binary. In other words, /openLCA-data-1.4/databases/[DB_NAME]/_olca_/sources/[UUID] contains:

{"@type":"Source","@id":"0cfc3611-6cbe-4270-bb17-0577de8fa1a2","name":"Test","description":"","version":"00.00.001","lastChange":"2024-05-07T13:40:57.492Z","externalFile":"some_pdf.pdf"}

It seems that the getBytes method of the GitStoreReader return the bytes of the JSON dataset instead of the binary bytes.

Thanks @jianchuanqi for catching that issue: https://github.com/GreenDelta/olca-app/issues/389

francoislerall avatar May 08 '24 14:05 francoislerall