View Source

[examples]
context.wtcl
cookies.wtcl
cookiesIntro.wtcl
errors.wtcl
errorsIntro.wtcl
expr.wtcl
fish.jpg
fish.wtcl
flush.wtcl
flushIntro.wtcl
form.wtcl
formIntro.wtcl
index.wtcl
ready.wtcl
scripting.wtcl
scripting.wtcl~
scriptingIntro.wtcl
session.wtcl
sessionIntro.wtcl
uploads/
uploads.wtcl
uploadsIntro.wtcl
virtual.wtcl
virtualIntro.wtcl
File: / examples / uploads.wtcl

Lines Size Modified Created Owner MIME Types
71 1,394 2010/05/18 23:04:06 2011/06/13 15:35:16 BUILTIN\Administrators application/x-wtcl, text/x-wtcl

0001
<?
0002
0003
include ../lib/examplePage.wtcl
0004
0005
::wt::examples::setTitle "Uploads"
0006
0007
include ../lib/header.wtcl
0008
0009
?>
0010
0011
<? if {[uploads count]} { ?>
0012
0013
  <h3>Received Files</h3>
0014
0015
  <?
0016
    set i 0
0017
    foreach upload [uploads values] {
0018
  ?>
0019
0020
    <p><b>Upload #[expr $i + 1]</b></p>
0021
0022
    <p>
0023
    <table cellpadding=5 cellspacing=0 border=0 width=600>
0024
    <tr>
0025
      <td style="padding: 5px;"><b>Name </b></td>
0026
      <td style="padding: 5px;">[upload name $upload]</td>
0027
    </tr>
0028
    <tr>
0029
      <td style="padding: 5px;"><b>Content type </b></td>
0030
      <td style="padding: 5px;">[upload contentType $upload]</td>
0031
    </tr>
0032
    <tr>
0033
      <td style="padding: 5px;"><b>File name </b></td>
0034
      <td style="padding: 5px;">[upload fileName $upload]</td>
0035
    </tr>
0036
    <tr>
0037
      <td style="padding: 5px;"><b>Upload path </b></td>
0038
      <td style="padding: 5px;">[upload path $upload]</td>
0039
    </tr>
0040
    <tr>
0041
      <td style="padding: 5px;"><b>Size </b></td>
0042
      <td style="padding: 5px;">[upload size $upload]</td>
0043
    </tr>
0044
    </table>
0045
    </p>
0046
0047
<?
0048
    incr i
0049
  }
0050
}
0051
?>
0052
0053
<h3>Files</h3>
0054
0055
<p>
0056
<form enctype="multipart/form-data" method=post action="[selfUrl -html]">
0057
  <p>
0058
    <b>Upload #1</b><br>
0059
    <input name="file1" type="file" />
0060
  </p>
0061
  <p>
0062
    <b>Upload #2</b><br>
0063
    <input name="file2" type="file" />
0064
  </p>
0065
  <p>
0066
    <input type=submit value=" OK ">
0067
  </p>
0068
</form>
0069
</p>
0070
0071
<? include ../lib/footer.wtcl ?>