Upload File
The Upload File control allows users to upload files to the server.
These files will be stored in a temporary location on the server for the duration of the user's session. Once the session ends, they are deleted. It is therefore important to write these files to a known location in order to access them at a later stage again. This can be done by looping over the files using a ForEach action inside of a script or eventhandler.
When adding an Upload File control, do this:
Drag the Upload File control onto the canvas.
Add a Button control and create a click event handler for the Button.
Add a ForEach action to the event handler.
Add to the Loop section of the ForEach action, the WriteFile operation from the File Connector and indicate the directory path for the uploaded file.
Add the required processing to handle the uploaded file to the Loop section of the ForEach action.
Please note: Due to restriction of the browser, a file without an extension can only be downloaded and cannot be opened or viewed in a browser tab.
Properties
Visible
Set to False if you don't want this control to render on the page and be visible to the user.
Error Messages:
File must be smaller than x MB
If this value has to be increased, change the maxRequestLength value in the web.config of the generated application. The maxRequestLength is specified in kilobytes and defaults to 4096 KB (4 MB). See here for more information on maxRequestLength.
Error
This could be caused by a number of reasons, of which one could be that the maxAllowedContentLength is not large enough. Increasing this value in the web.config of the generated application could resolve the issue. The maxAllowedContentLength is specified in bytes and defaults to 30000000 (28.6 MB). See here for more information on maxAllowedContentLength.
Last updated