|
From: <sub...@co...> - 2007-06-05 23:25:38
|
Author: ianb
Date: 2007-06-05 17:25:42 -0600 (Tue, 05 Jun 2007)
New Revision: 2708
Modified:
FormEncode/trunk/formencode/validators.py
Log:
added a bit more explanation in the docstring
Modified: FormEncode/trunk/formencode/validators.py
===================================================================
--- FormEncode/trunk/formencode/validators.py 2007-06-05 23:25:26 UTC (rev 2707)
+++ FormEncode/trunk/formencode/validators.py 2007-06-05 23:25:42 UTC (rev 2708)
@@ -1607,6 +1607,20 @@
there may be extra values ``'original_filename'`` and
``'original_content'``, which may want to use in your form to show
the user you still have their content around.
+
+ To use this, make sure you are using variabledecode, then use
+ something like::
+
+ <input type="file" name="myfield.upload">
+ <input type="hidden" name="myfield.static">
+
+ Then in your scheme::
+
+ class MyScheme(Scheme):
+ myfield = FileUploadKeeper()
+
+ Note that big file uploads mean big hidden fields, and lots of
+ bytes passed back and forth in the case of an error.
"""
upload_key = 'upload'
|