[librecat-dev] uploading multiple files to same librecat record via files.yml file
Jonathan NORRIS
jnorris at ist.ac.at
Wed May 9 08:52:32 CEST 2018
Hey,
I am trying to upload files to the database using: bin/librecat
publication files.yml
In this file there is plenty of files that relate to one librecat
record. It looks like it is possible to do this as the example in the
documentation does this:
|$ bin/librecat publication files --- id: 000000002 access_level:
open_access relation: main_file embargo: NA file_name: 183589768.pdf ...
--- id: 000000002 access_level: open_access relation: main_file embargo:
NA file_name: cpanfile|
They both relate to the same librecat id.
However when I try it is failing on the first occurrence of a file
relating to a librecat id already containing a file. My file looks like
this:
---
{access_level: open_access, content_type: application/pdf, file_name:
IST-2010-0003.pdf,
id: '1411', relation: main_file}
...
---
{access_level: open_access, content_type: application/pdf, file_name:
Simulation_distances.pdf,
id: '1411', relation: main_file}
...
The error message is:
FATAL - cowardly refusing to delete `IST-2010-0003.pdf` from 1411
at /root/perl5/lib/perl5/Catmandu/Iterable.pm line 88.
The only thing that I can see is that they both have the same
content_type, in the example in the docs they don't have a content_type.
Could it be failing because of the same content types?
Thanks,
Jonathan
IST Austria
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.uni-bielefeld.de/mailman2/unibi/public/librecat-dev/attachments/20180509/c43d69fe/attachment.html>
More information about the librecat-dev
mailing list