EPrints Technical Mailing List Archive
See the EPrints wiki for instructions on how to join this mailing list and related information.
Message: #08206
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
Re: [EP-tech] Adding file to eprints record using perl script results in "In PDF Document: You need to select a file to be shown first"
- To: "eprints-tech@ecs.soton.ac.uk" <eprints-tech@ecs.soton.ac.uk>, "Patrick Camilleri" <patrik.camilleri@gmail.com>
- Subject: Re: [EP-tech] Adding file to eprints record using perl script results in "In PDF Document: You need to select a file to be shown first"
- From: John Salter <J.Salter@leeds.ac.uk>
- Date: Thu, 18 Jun 2020 10:50:39 +0000
HI Patrick, Thanks for a very well asked question! I think you just need to do this: Cheers, John From: eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk]
On Behalf Of Patrick Camilleri via Eprints-tech Hello, I'm trying to attach a pdf to an already existing record using a perl script but not being fully successful. I'm able to attach the pdf to the record because I can see it in the uploaded items but I get the warning "In PDF document: You
need to select a file to be shown first". To be more precise this is what I see in the browser: - Under the Preview tab of the record in question, clicking on the PDF icon leads to "404 File not found. Could not find the file: /id/eprint/70/1/". As you can see the filename is missing from the path. The file is in the folder though
as I can confirm by browsing to the relevant folder in the terminal. - Under the Details tab of the record in question, clicking on the PDF icon takes you to the pdf and the link is correct. The message I see on this page is: "In PDF document: You need to select a file to be shown first". Is there I command I'm missing to execute in addition to $doc->add_file, $doc->set_value and $doc->commit()? See below for a code excerpt. This is the relevant Perl code which I'm using to attach a pdf to an already existing record (inspired from https://www.researchgate.net/publication/291251891_Batch_Ingesting_into_EPrints_Digital_Repository_Software). my $dataset_id = 'eprint'; # $filepath = '/opt/eprints3/import-data/filename.pdf' # $filename = 'filename.pdf' Any pointers to what I'm doing wrong is greatly appreciated! Would really love to get this resolved because I have a big library of pdfs which I would like to import. Please let me know if you require additional information or if I haven't been clear enough in describing the problem. Regards, Patrick |
- Follow-Ups:
- Re: [EP-tech] Adding file to eprints record using perl script results in "In PDF Document: You need to select a file to be shown first"
- From: John Salter <J.Salter@leeds.ac.uk>
- Re: [EP-tech] Adding file to eprints record using perl script results in "In PDF Document: You need to select a file to be shown first"
- References:
- [EP-tech] Adding file to eprints record using perl script results in "In PDF Document: You need to select a file to be shown first"
- From: Patrick Camilleri <patrik.camilleri@gmail.com>
- Re: [EP-tech] Adding file to eprints record using perl script results in "In PDF Document: You need to select a file to be shown first"
- From: John Salter <J.Salter@leeds.ac.uk>
- [EP-tech] Adding file to eprints record using perl script results in "In PDF Document: You need to select a file to be shown first"
- Prev by Date: [EP-tech] Adding file to eprints record using perl script results in "In PDF Document: You need to select a file to be shown first"
- Next by Date: Re: [EP-tech] Adding file to eprints record using perl script results in "In PDF Document: You need to select a file to be shown first"
- Previous by thread: [EP-tech] EPrints/CRIS
- Next by thread: [EP-tech] DOI handling in orcid_support_advance
- Index(es):