Difference between revisions of "Ns getformfile"
Jump to navigation
Jump to search
(imported from WiKit id 567) |
|||
Line 1: | Line 1: | ||
− | + | ||
+ | '''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
- 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.