Member variable HttpRequest():Files Foundation
Provides access to the files uploaded from the browser.
The member variable :Files provides access to files that have been uploaded from the web browser.
The following HTML markup is required for uploading a file to upload.cxp. The method attribute must be post, the enctype attribute must be multipart/form-data.
In the following example the member variable :NumItems is used to test if a file was uploaded from the browser. The file then is accessed via a member variable with the name :filedata which is an instance of the class HttpUploadedFile. Note that the name of the instance variable corresponds with the name attribute of the HTML input tag above:
Assumed the file readme.txt was uploaded then this is the resulting HTML markup:
It is possible to upload more then one file at the same time by having several file input elements in a single form:
The :Files object provides the method :getItem() and the instance variable :NumItems that allow to iterate through the HttpUploadedFileinstances:
The resulting HTML markup will look like this in case image.png and description.xml have been upload:
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.