Before including a file control into your application, you must have a storage bucket configured in Orchestrator and imported in your application.
For more information how to achieve this, see Referencing a Storage Bucket from Orchestrator.
Note: In places where you want to pass 'uploaded file name' as an input to a process, instead of directly setting the process input parameter with the uploaded file name, you should use an app variable to set the uploaded file name. You can then perform an input override of the process argument with the app variable, to pass the uploaded file name to the process.
Go to the app where you want to add a file control.
Go to Add a new control > Input control and add a new File Picker control to your app.
Configure the File Picker control according to your needs.
3.1 Pick a maximum file size.
3.2 Fill in the Allowed file types field using the following format:
.jpg, .pdf, .png.
3.3 Fill in the Helper text field with the text you want to be displayed on the control in runtime.
3.4 Configure the Other Properties section according to your needs.
3.5 Configure the style of the control according to your needs. For short tips on how to design an app, see General User Experience Guidelines.
Go to Add a new control > Input control and add a new Button control underneath the File Picker control in your app and rename it Upload.
On the new Button control, go to Events > Create Rule and create an Upload file to Storage bucket rule for this control.
Configure the Upload file to Storage bucket rule.
6.1 Add the Filepicker control in the File to upload field.
6.2 Add the Storage bucket imported during the Prerequisites.
6.3 To make sure that files do not get overwritten, we recommend keeping the Auto-generate name box checked. If you want to create a name by yourself, uncheck the Auto-generate name box. You can create a specific file name format using
Concatfunctions and add uniqueness to filenames using the
guidfunction. Make sure that filenames are unique so that they are not overwritten with files with the same name.
You can use the following examples to generate a name:
6.4 Set the uploaded file name to an app variable in the When completed section. To add the file name, drag and drop the Uploaded File Name in the Value field. This way the file name can be sent to automation or used for downloading the file.
Updated about a year ago