Stadium
  • Home
  • Academy
  • How it works
    • Designer
    • Application Manager
    • Application users and roles
    • Designing applications
    • User API
  • Features
    • Application
    • Create a Form
    • Embedded Files
    • Events
    • Expression Editor
    • Pages
    • Preview
    • Publish
    • Scripts and Event Handlers
    • Session Variables
    • Settings
    • Styles
    • StyleSheet
    • Templates
    • Types
    • Validations Cheat Sheet
  • Connectors
    • Database Connector
    • File System Connector
    • Web Service Connector
  • Controls
    • Button
    • Chart
    • Checkbox
    • Checkbox List
    • Container
    • Data Grid
    • Date Picker
    • Drop Down
    • Flexbox
    • Grid
    • Image
    • Label
    • Link
    • Menu
    • Panel
    • Radio Button List
    • Repeater
    • Table
    • Text Box
    • Upload File
  • Actions
    • Async
    • Call Web Service
    • Decision (If/Else)
    • Display Message Box
    • Download File
    • For Each
    • Java Script
    • Navigate To Page
    • Notification
    • Set Value
    • Variable
    • While
  • Release Notes
    • 6.12.3272
    • 6.12.3270
    • 6.12.3268
    • 6.12.3264
    • 6.11.3223
    • 6.11.3221
    • 6.11.3220
    • 6.11.3218
    • 6.11.3210
    • 6.10.3155
    • 6.10.3151
    • 6.9.3102
    • 6.8.3100
    • 6.7.3096
    • 6.6.3082
    • 6.6.3081
    • 6.6.3080
    • 6.6.3075
    • 6.5.3055
    • 6.4.3036
    • 6.4.3034
    • 6.4.3033
    • 6.3.3019
    • 6.2.2999
    • 6.2.3001
    • 6.1.2990
    • 6.0.2972
    • 6.0.2970
    • 6.0.2969
Powered by GitBook
On this page
  • Properties
  • Error Messages:

Was this helpful?

  1. Controls

Upload File

PreviousText BoxNextActions

Last updated 8 months ago

Was this helpful?

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

  1. Visible

    Set to False if you don't want this control to render on the page and be visible to the user.


Error Messages:

  1. File must be smaller than x MB

    	<configuration>
    		<system.web>
    			<httpRuntime targetFramework="4.6" maxRequestLength="153600" />
    		</system.web>
    	</configuration>
    		
  2. Error

    	<configuration>
    		<system.webServer>
    			<security>
    				<requestFiltering>
    					<requestLimits maxAllowedContentLength="30000000" />
    				</requestFiltering>
    			</security>
    		</system.webServer>
    	</configuration>
    		

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 for more information on maxRequestLength.

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 for more information on maxAllowedContentLength.

here
here
Add an Upload File control