new HttpServerFileUpload()
Represents an file upload from an HTML FORM.
Methods
charset() → {string}
Returns:
-
the charset for the upload
-
- Type
- string
contentTransferEncoding() → {string}
Returns:
-
the contentTransferEncoding for the upload
-
- Type
- string
contentType() → {string}
Returns:
-
the content type for the upload
-
- Type
- string
endHandler(endHandler) → {HttpServerFileUpload}
Parameters:
Name | Type | Description |
---|---|---|
endHandler |
function |
Returns:
- Type
- HttpServerFileUpload
exceptionHandler(handler) → {HttpServerFileUpload}
Parameters:
Name | Type | Description |
---|---|---|
handler |
function |
Returns:
- Type
- HttpServerFileUpload
filename() → {string}
Returns:
-
the filename which was used when upload the file.
-
- Type
- string
handler(handler) → {HttpServerFileUpload}
Parameters:
Name | Type | Description |
---|---|---|
handler |
function |
Returns:
- Type
- HttpServerFileUpload
isSizeAvailable() → {boolean}
Returns:
-
true if the size of the upload can be retrieved via HttpServerFileUpload#size.
-
- Type
- boolean
name() → {string}
Returns:
-
the name of the attribute
-
- Type
- string
pause() → {HttpServerFileUpload}
Returns:
- Type
- HttpServerFileUpload
resume() → {HttpServerFileUpload}
Returns:
- Type
- HttpServerFileUpload
size() → {number}
The size of the upload may not be available until it is all read.
Check HttpServerFileUpload#isSizeAvailable to determine this
Returns:
the size of the upload (in bytes)
- Type
- number
streamToFileSystem(filename) → {HttpServerFileUpload}
Stream the content of this upload to the given file on storage.
Parameters:
Name | Type | Description |
---|---|---|
filename |
string | the name of the file |
Returns:
- Type
- HttpServerFileUpload