Dear Magdalena,

On Mon, 27 Jul 2009, LORENTE MARTINEZ, MAGDALENA wrote:

I've seen on many Invenio based websites that it's possible to have more than one file in the 856 Marc tag [...] I've been trying to create a form for a picture doctype that allows such behaviour without success (I'm using v0.99.1). I couldn't find anything in the documentation and only found this unanswered mail [...]

The mailings archives pages have not been refreshed for a
while. Here is the answer to the mail you are referring to:

      As you know in websubmit one uses a 'File Input' element type in
order to upload a file. You may simply have multiple File Input element
types in the form. The actual handling of the file is done by
Move_Files_to_Storage - where you may pass it a dictionary of values...
  In this way one can have (up to)N files uploaded - as long as there
are N File Input elements.


This works quite well when you have only a few files to upload,
and this is usually the simplest method, both for your users to
use and for you to setup.  Eg: add MY_FILE_1 and MY_FILE_2 to
your submission page (after you have defined these new "File
Input" elements). You can then modify accordingly the submission
templateS used by the "Make_Record" function to create the 856
fields. Also use the "Move_Files_to_Storage" function to actually
move the files to their correct location.

Alternatively, instead of building the 856 fields and
using "Move_Files_to_Storage", you can modify your submission
template to create an "FFT" tag. This is documented in the
BibUpload guide (which takes over the submission job after
WebSubmit has created the MARCXML).
<http://invenio-demo.cern.ch/help/admin/bibupload-admin-guide#3.5>
An example is provided in the "DEMOARTcreate.tpl" file.  You can
use this technique to attach several files to a record, simply by
repeating the FFT tags.  The advantage of this technique is that
BibUpload is taking care of creating the 856 fields and moving the
files to the storage place.

For more flexibility, you can use the Upload_Files function,
which builds an interface to add or remove files.  Compared to
the previous techniques, this one also let your users add an
indefinite number of files, or delete them. It has some
disadvantages, like the need to be preceded by a "Create_Recid"
function (and hence losing a record ID if a user aborts the
submission), and to be placed on its own step (1. Your custom
submission page is displayed, and users enters metadata 2. The
functions are run after the user click on "continue",
and "Upload_Files" displays the interface to upload files).
Unfortunately this technique does not create the 865 fields for
you, though it correctly appends the files to the record. It
needs to be followed by a "bibdocfile --fix-marc" command, to
create update the MARC with the information from the storage
place (this fix-marc command could be run manually periodically,
or added as a WebSubmit function after the "Insert_Record"
function, or even better, included in the "Upload_Files"
function). This has been discussed recently on the mailing lists.

I hope that the above information gives you a better overview of
files management with WebSubmit.  The WebSubmit documentation is
scarce. The best is usually to learn by looking at the sample
submissions shipping with the Atlantis demo site.  In the next
release of CDS Invenio these demo submissions will be completed
with additional examples and new file-related functions.

Best regards
--
Jerome Caffaro ** CERN Document Server ** <http://cds.cern.ch/>

Reply via email to