[Koha] [EXTERNAL] Uploading files

Ma. Victoria H. Silva-Manuel mavicsilva at gmail.com
Fri Mar 24 14:12:37 NZDT 2023


Thank you for responding.

The OPACBaseURL is the one that I missed. I am able to download the
uploaded files now.

Another question, can we make the file open in a new tab instead of
downloading it?



On Fri, Mar 24, 2023, 4:02 AM Caroline Cyr La Rose <
caroline.cyr-la-rose at inlibro.com> wrote:

> Building on Fred's answer about the part on doing it within Koha...
>
> Check your koha-conf.xml to make sure your upload path is valid and a
> writable directory.
>
> Check your OpacBaseURL system preference, it should contain the URL to
> your OPAC, starting with http(s) and no trailing slash. Using Fred's
> example, it would be http://library.aq
>
> As far as I know, the upload plugin will take care of the 32-character
> hash. No need to worry about that part. You only need to upload the file
> and select it directly from the plugin. The URL created in 856$u should
> be something like {OPACBaseURL}/cgi-bin/koha/
> opac-retrieve-file.pl?id={hash}
> <http://opac-retrieve-file.pl?id=%7Bhash%7D>
>
> Regards,
>
> Caroline
>
> On 2023-03-23 15:11, King, Fred wrote:
> > Just in case you haven't received an answer, here's mine:
> >
> > I can think of several ways to do this, if I understand your situation
> correctly. Everyone else, please chime in if I'm wrong. I'm using MARC21 on
> Koha 22.11. Let's call your library's URL http://library.aq. Let's also
> say that you have access to another server called http://documents.aq.
> Both systems are running on Ubuntu, which is the only system I know how to
> do this on. I'm also using http, not https. I don't think it matters in
> this case. The document is avengingchicken.pdf
> >
> > The 856$u field is looking for a URL to the file, rather than the file
> itself. So, you need to figure out where the file is.
> >
> > The easiest way would be to put it on the external server. If you upload
> it to the directory a lot of systems use, it would be in /var/www/html, and
> the URL you'd put in the 856$u would be
> http://documents.aq/avengingchicken.pdf.
> >
> > If you don't have an external server available, you can put it on the
> Koha server itself. (I learned this fairly recently for reasons explained
> below.) If you upload your file to /usr/share/koha/opac/htdocs, it's
> accessible as, for example, http://library.aq/avengingchicken.pdf. You
> can configure your Ubuntu server to use a different directory by using
> symbolic links, but let's not get into that today.
> >
> > Unfortunately, both of these require the ability to upload files to a
> server. I use FileZilla to transfer files--free and easy to use. If you
> can't log in as root, it's still possible but it gets more complicated. If
> you know a friendly sysadmin, they might do it for you. Give them cookies.
> >
> > But wait, I hear you say, can't you do this directly from Koha? You can,
> but I still haven't figured out how to do it. I know that you need to set
> the access directory and upload directory in the
> /etc/koha/sites/(yourlibrary)/koha-conf.xml (towards the bottom of the
> screen), and that Koha gives the file a 32-character hash tag. After that,
> I got horribly lost, which is why I figured out a different way.
> >
> > Good luck!
> >
> > Fred King, MSLS, AHIP
> > Medical Librarian, MedStar Washington Hospital Center
> > fred.king at medstar.net
> > 202-877-6670
> > ORCID 0000-0001-5266-0279
> > MedStar Authors Catalog: http://medstarauthors.org
> >
> > You know it's cold outside when you go outside and it's cold.
> > --NPS Twitter
> >
> > -----Original Message-----
> > From: Koha <koha-bounces at lists.katipo.co.nz> On Behalf Of Ma. Victoria
> H. Silva-Manuel
> > Sent: Wednesday, March 22, 2023 9:35 PM
> > To: koha <koha at lists.katipo.co.nz>
> > Subject: [EXTERNAL] [Koha] Uploading files
> >
> >
> >
> > **ATTENTION: This email originated from outside the MedStar Health
> network.
> >   ** DO NOT CLICK links or attachments unless you recognize the sender
> and know the content is safe.
> >
> >
> >
> > I successfully uploaded a file in tag 856$u but when I checked it out in
> OPAC, I'm getting Error 404 (Sorry, the requested page is not available).
> >
> > I already choose "upload.pl" in plugin in the bibliographic framework.
> >
> > What should I do?
> >
> > Thanks.
> > _______________________________________________
> >
> > Koha mailing list  http://koha-community.org Koha at lists.katipo.co.nz
> > Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
> >
> > ----------------------------------------------------------------------
> > MedStar Health is a not-for-profit, integrated healthcare delivery
> system, the largest in Maryland and the Washington, D.C., region.
> Nationally recognized for clinical quality in heart, orthopedics, cancer
> and GI.
> >
> > IMPORTANT: This e-mail (including any attachments) may contain
> information that is private, confidential, or protected by attorney-client
> or other privilege. If you received this e-mail in error, please delete it
> from your system without copying it and notify sender by reply e-mail, so
> that our records can be corrected... Thank you.
> >
> > Help conserve valuable resources - only print this email if necessary.
> >
> >
> > _______________________________________________
> >
> > Koha mailing list  http://koha-community.org
> > Koha at lists.katipo.co.nz
> > Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
>
> Caroline Cyr-La-Rose, M.L.I.S. (she/her)
> Librarian | Product Manager
>
> 1-833-INLIBRO (465-4276), ext. 221
> caroline.cyr-la-rose at inlibro.com
> https://www.inLibro.com
>
> _______________________________________________
>
> Koha mailing list  http://koha-community.org
> Koha at lists.katipo.co.nz
> Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
>


More information about the Koha mailing list