# uploadForm

## Purpose

Creates a form that can submit multi-part data used in file uploads.

## Examples

    <g:uploadForm name="myUpload">
        <input type="file" name="myFile" />
    </g:uploadForm>

## Description

Identical to regular form except sets `enctype` attribute to `"multipart/form-data"` automatically.

Attributes

- `action` (optional) - the name of the action to use in the link, if not specified the default action will be linked
- `controller` (optional) - the name of the controller to use in the link, if not specified the current controller will be linked
- `id` (optional) - The id to use in the link
- `url` (optional) - A map containing the action,controller,id etc.

## Source

Show Source

    def uploadForm = { attrs, body ->
            attrs.enctype = "multipart/form-data"
            out << form(attrs, body)
        }