[Zope] Update a file
Timothy Wilson
wilson@visi.com
Mon, 15 Oct 2001 10:11:59 -0500 (CDT)
On Mon, 15 Oct 2001, ruben wrote:
> I want that the user update the files using a form.
> How can I do this?
Here's something lifted directly from my site. It's two DTML Methods. The
first is the form and the second is the method that actually performs the
update. Good luck.
<dtml-var standard_html_header>
<h2>Update Bookmarks</h2>
<p>Use this form to update the IMC bookmark file. Use the "Browse..." button
to search for the
bookmark file on your local hard drive.</p>
<form action="update" method="post" enctype="multipart/form-data">
<input type="file" name="file" size="25" value=""><br>
<input type="submit" value=" Update ">
</form>
<dtml-var standard_html_footer>
<dtml-var standard_html_header>
<dtml-call expr="_.getitem('Bookmark.htm').manage_upload(file=file)">
<h2>Success!</h2>
<p>Return to the <a href="/sibley/imc/">IMC homepage</a>.</p>
<dtml-var standard_html_footer>
-Tim
--
Tim Wilson | Visit Sibley online: | Check out:
Henry Sibley HS | http://www.isd197.org | http://www.zope.com
W. St. Paul, MN | | http://slashdot.org
wilson@visi.com | <dtml-var pithy_quote> | http://linux.com