Difference between revisions of "Ns getformfile"

From AOLserver Wiki
Jump to navigation Jump to search
(imported from WiKit id 567)
 
Line 1: Line 1:
nn
+
 
 +
'''NAME'''
 +
 
 +
: ns_getformfile - Return a tempfile for a form file field.
 +
 
 +
'''SYNOPSIS'''
 +
 
 +
: '''ns_getformfile''' ''fileUploadFormFieldName''
 +
 
 +
'''DESCRIPTION'''
 +
 
 +
# Briefly, use:
 +
#
 +
# <form enctype="multipart/form-data" action="url" method=post>
 +
# First file: <input name="file1" type="file">
 +
# Second file: <input name="file2" type="file">
 +
# <input type="submit">
 +
# </form>
 +
#
 +
# and then access with:
 +
#
 +
# set tmpfile1 [ns_getformfile file1]
 +
# set tmpfile2 [ns_getformfile file2]
 +
# set fp1 [open $tmpfile1]
 +
# set fp2 [open $tmpfile2]
 +
#
 +
# Temp files created by ns_getform are removed when the connection closes.
 +
#

Revision as of 01:37, 11 October 2009

NAME

ns_getformfile - Return a tempfile for a form file field.

SYNOPSIS

ns_getformfile fileUploadFormFieldName

DESCRIPTION

  1. Briefly, use:
  2. <form enctype="multipart/form-data" action="url" method=post>
  3. First file: <input name="file1" type="file">
  4. Second file: <input name="file2" type="file">
  5. <input type="submit">
  6. </form>
  7. and then access with:
  8. set tmpfile1 [ns_getformfile file1]
  9. set tmpfile2 [ns_getformfile file2]
  10. set fp1 [open $tmpfile1]
  11. set fp2 [open $tmpfile2]
  12. Temp files created by ns_getform are removed when the connection closes.