1 %# $Id: upload.mc,v 1.2 2007-07-17 14:31:54 mike Exp $
5 % if (!defined $filename) {
7 Please note that this form expects a
8 <a href="http://explain.z3950.org/"
11 <a href="http://www.loc.gov/standards/sru/explain/"
12 >SRU explainResponse</a>.
14 <form method="post" action=""
15 enctype="multipart/form-data">
17 ZeeRex file to upload:
18 <input type="file" name="filename" size="50"/>
20 <input type="submit" name="_submit" value="Submit"/>
26 my $fin = $r->upload()->fh();
28 $m->comp("/details/error.mc", msg => "Upload cancelled");
32 my $xml = join("", <$fin>);
33 my $xc = irspy_xpath_context($xml);
34 my $id = irspy_record2identifier($xc);
35 my $conn = new ZOOM::Connection("localhost:8018/IR-Explain---1", 0,
36 user => "admin", password => "fruitbat",
37 elementSetName => "zeerex");
38 ZOOM::IRSpy::_really_rewrite_record($conn, $xc->getContextNode());
45 <a href="<% xml_encode("/full.html?id=" . uri_escape($id))
46 %>">the new record</a>.