TActiveFileUpload displays a file upload field on a page. Upon postback,
the text entered into the field will be treated as the name of the file
that will be uploaded to the server. The property {@link getHasFile HasFile}
indicates whether the file upload is successful. If successful, the file
may be obtained by calling {@link saveAs} to save it at a specified place.
You can use {@link getFileName FileName}, {@link getFileType FileType},
{@link getFileSize FileSize} to get the original client-side file name,
the file mime type, and the file size information. If the upload is not
successful, {@link getErrorCode ErrorCode} contains the error code
describing the cause of failure.
TActiveFileUpload raises {@link onFileUpload OnFileUpload} event if a file is uploaded
(whether it succeeds or not).
TActiveFileUpload actually does a postback in a hidden IFrame, and then does a callback.
This callback then raises the {@link onFileUpload OnFileUpload} event. After the postback
a status icon is displayed; either a green checkmark if the upload is successful,
or a red x if there was an error.
TActiveFileUpload needs either an application level cache or a security manager to work securely.
getAutoPostBack()
public méthode
public getAutoPostBack ( ) : boolean |
Résultat |
boolean |
a value indicating whether an automatic callback to the server will occur whenever the user modifies the text in the TTextBox control and then tabs out of the component. Defaults to true.
Note: When set to false, you will need to trigger the callback yourself. |
raisePostDataChangedEvent()
public méthode
This method calls {@link onFileUpload} method
This method is primarily used by framework developers.
setAutoPostBack()
public méthode