Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

The upload component supports default value binding (based on id) and validation.

Wiki Markup
{float:right|background=#eee|padding=0 1em}
    *JumpStart Demo:*
    [File Upload|

...

https://tapestry-jumpstart.

...

org/jumpstart/examples/javascript/fileupload]
{float}


Component Template

Code Block
languagejava
    <t:form>
        <t:errors/>
        <input t:type="upload" t:id="file" t:value="file" validate="required"/>
        <br/>
        <input type="submit" value="Upload"/>
    </t:form>

...

Four values may be configured as symbols:

upload.repository-location

The directory to which files that are too large to keep in memory will be written to. The default is from the java.io.tmpdir system property.

upload.repository-threshold

Upload size, in bytes, at which point the uploaded file is written to disk rather than kept in memory. The default is 10 kilobytes.

upload.requestsize-max

Maximim size, in bytes, for the overall request. If exceeded, a FileUploadException will occur. The default is no maximum.

upload.filesize-max

Maximum size, in bytes, for any individual uploaded file. Again, a FileUploadException will occur if exceeded. The default is no maximum.

The class UploadSymbols defines constants for all four of these.

...