<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hey,<br>
    <br>
    I am trying to upload files to the database using:  bin/librecat
    publication files.yml<br>
    <br>
    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:<br>
    <br>
    <pre><code>$ 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</code></pre>
    <br>
    They both relate to the same librecat id.<br>
    <br>
    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:<br>
    <br>
    <div style="color: #d4d4d4;background-color: #1e1e1e;font-family: 'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback';font-weight: normal;font-size: 14px;line-height: 19px;white-space: pre;"><div><span style="color: #d4d4d4;">---</span></div><div><span style="color: #d4d4d4;">{</span><span style="color: #569cd6;">access_level</span><span style="color: #d4d4d4;">: </span><span style="color: #ce9178;">open_access</span><span style="color: #d4d4d4;">, </span><span style="color: #569cd6;">content_type</span><span style="color: #d4d4d4;">: </span><span style="color: #ce9178;">application/pdf</span><span style="color: #d4d4d4;">, </span><span style="color: #569cd6;">file_name</span><span style="color: #d4d4d4;">: </span><span style="color: #ce9178;">IST-2010-0003.pdf</span><span style="color: #d4d4d4;">,</span></div><div><span style="color: #d4d4d4;">  </span><span style="color: #569cd6;">id</span><span style="color: #d4d4d4;">: </span><span style="color: #ce9178;">'1411'</span><span style="color: #d4d4d4;">, </span><span style="color: #569cd6;">relation</span><span style="color: #d4d4d4;">: </span><span style="color: #ce9178;">main_file</span><span style="color: #d4d4d4;">}</span></div><div><span style="color: #d4d4d4;">...</span>
<div style="color: #d4d4d4;background-color: #1e1e1e;font-family: 'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback';font-weight: normal;font-size: 14px;line-height: 19px;white-space: pre;"><div><span style="color: #d4d4d4;">---</span></div><div><span style="color: #d4d4d4;">{</span><span style="color: #569cd6;">access_level</span><span style="color: #d4d4d4;">: </span><span style="color: #ce9178;">open_access</span><span style="color: #d4d4d4;">, </span><span style="color: #569cd6;">content_type</span><span style="color: #d4d4d4;">: </span><span style="color: #ce9178;">application/pdf</span><span style="color: #d4d4d4;">, </span><span style="color: #569cd6;">file_name</span><span style="color: #d4d4d4;">: </span><span style="color: #ce9178;">Simulation_distances.pdf</span><span style="color: #d4d4d4;">,</span></div><div><span style="color: #d4d4d4;">  </span><span style="color: #569cd6;">id</span><span style="color: #d4d4d4;">: </span><span style="color: #ce9178;">'1411'</span><span style="color: #d4d4d4;">, </span><span style="color: #569cd6;">relation</span><span style="color: #d4d4d4;">: </span><span style="color: #ce9178;">main_file</span><span style="color: #d4d4d4;">}</span></div><div><span style="color: #d4d4d4;">...</span></div></div><span style="color: #d4d4d4;"></span></div></div>
    <br>
    The error message is:<br>
    <br>
        FATAL - cowardly refusing to delete `IST-2010-0003.pdf` from
    1411 at /root/perl5/lib/perl5/Catmandu/Iterable.pm line 88.<br>
    <br>
    <br>
    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?<br>
    <br>
    Thanks,<br>
    Jonathan<br>
    IST Austria<br>
    <br>
    <br>
    <br>
  </body>
</html>