EPrints Technical Mailing List Archive

See the EPrints wiki for instructions on how to join this mailing list and related information.

Message: #09905


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

Re: [EP-tech] Bulk PDF Upload Issue


Hi Joel,

I think you need to set (to 1) the enable_file_imports option:

https://wiki.eprints.org/w/Miscellaneous_Config_Options#E

I did spend some back in July this year going through the codebase to make sure all configuration options that were not set in the configuration files included in a default installation were documented, (as well as any of those that are defined in configuration files [1]).  As after quite a few years, I was still discovering configuration options I did not know existed and in some cases had created very similar functionality and configuration to solve the same problem.

Regards

David Newman
[1] https://wiki.eprints.org/w/Config_Options_by_File


On 20/12/2024 6:57 pm, Joel Brown wrote:
CAUTION: This e-mail originated outside the University of Southampton.
CAUTION: This e-mail originated outside the University of Southampton.
Hey all,

We're in the process of setting up a new repository and are preparing to bulk import ~1300 articles to get it started. We are using XML to bulk import the entries (and this works fine). However, it has been tricky to find how to import a PDF along with each entry. I imagine the workflow would look something like this:
  1. Upload PDFs to an accessible location on the server.
  2. Include a URL reference to each individual PDF in the XML upload.
  3. During the upload eprints will pull the PDF from the specified location and add it to the eprints3/archives/<archive>/documents folder 

I've performed a simple test to do an XML upload that includes "foo.png". Here's what I've done:
  • Include foo.png in the /opt/eprints3 folder.
  • Include /opt/eprints3/foo.png in the document heading of the XML file:
<documents>
<document>
<docid>1</docid>
<rev_number>1</rev_number>
<pos>1</pos>
<format>image/png</format>
<language>en</language>
<security>public</security>
<main>foo.png</main>
<files>
<file>
<filename>foo.png</filename>
<data href="">
</file>
</files>
</document>
</documents>
  • Run the following command:
./bin/import --user 6 --enable-file-imports crsq eprint XML eprint.xml

Results: The upload works (the entry is created), but the foo.png doesn't actually link to anything. What am I missing?


Thanks,
Joel