1 %# $Id: upload.mc,v 1.1 2007-06-28 13:37:11 mike Exp $
5 % if (!defined $filename) {
6 <form method="post" action=""
7 enctype="multipart/form-data">
10 <input type="file" name="filename" size="50"/>
12 <input type="submit" name="_submit" value="Submit"/>
18 my $fin = $r->upload()->fh();
20 $m->comp("/details/error.mc", msg => "Upload cancelled");
24 my $xml = join("", <$fin>);
25 my $xc = irspy_xpath_context($xml);
26 my $id = irspy_record2identifier($xc);
27 my $conn = new ZOOM::Connection("localhost:8018/IR-Explain---1", 0,
28 user => "admin", password => "fruitbat",
29 elementSetName => "zeerex");
30 ZOOM::IRSpy::_really_rewrite_record($conn, $xc->getContextNode());
37 <a href="<% xml_encode("/full.html?id=" . uri_escape($id))
38 %>">the new record</a>.