Note: Nintex Apps data centers are located in West US and Australia (AUS). In-region processing of Nintex Apps data is only available in these regions.
File Upload
A data component, the File Upload component allows end users to upload and associate files as fields within a record, or remove uploaded files. In some cases, files can be listed in a table, allowing users to click and preview the file; or, a File Upload component can allow users to add an image, such as for a user profile.
Using the File Upload Component
After adding a File Upload component to the page, set the File Properties. End users can upload files by clicking the Upload button and browsing for the file, or files can be dragged and dropped into the upload area.
The File Upload component can be adapted to many uses. The key to its versatility: how you set the Parent Model and File Storage Locations. For example:
- With the Parent Model set as None, choose a connection and (when permitted) the file storage location. Files will then be uploaded into the specified location in the connection.
- Specifics about using the File Upload component with Google Drive and uploading files.
Using with the Salesforce connector
The File Upload component has specific properties and options when used with a model on a Salesforce connector.
Let end users add images with File Upload
While the Image component is an obvious choice when adding images to a page, it doesn't allow end users to add or edit the image at runtime. The Salesforce connector provides File Upload properties that allow users add/edit/remove an image on a page—for example, add a profile photo on a user detail page.
Set the File storage location to In field on record, and Display as to File preview/image. Then, select a reference field where the uploaded image will be stored (depending upon the object, you may want to create a new field in Salesforce for this purpose). Users will see an upload box with a default image (also set in the properties pane). They can click this to add their photo; once the image is present, they can delete it or replace it with another.
Properties
Component properties
In the General tab, there are several standard options:
-
Save to: Choose to save the attachment to:
-
Connection: Select the connection where the file will be stored.
- Parent model: The model containing the records that will be associated with the uploaded file. Nintex Apps uses this model's connection to determine the File Storage Location options. You can also select "None" and designate a connection where the uploaded file will be stored.
Note: The File Upload component is not compatible with all connections. If you cannot select a model you created on a specific connection, try selecting "None" and then follow the instructions under If None is selected for the model.
- Connector: The connector used to create the target connection (below).
- Connection: The target connection for the uploaded file.
- File storage location: Files uploaded are stored in a field on the object associated with the model. (For some model types, the location will be automatically filled in.) The file storage options will vary, depending upon the object/connection used by the parent model.
- Upload button label: Text for the upload button. The default label is "Upload."
- Upload button icon: The icon to be included to the button label. Click the field picker to select an icon.
- File name: In some cases, you can rename the file. If this field is left blank, the filename will remain the same.
- File description: Short descriptive text for uploaded files.
- Upload URL: Specific URL where the file will be uploaded.
-
-
Field on model: Select a field on a model where the file will be stored.
- Model: The name of the model containing the records that will be associated with the uploaded file. Nintex Apps populates the picklist with all models created on the page.
- Field: Select the field from the picklist.The field picklist reflects the model selected.
Additional options open up, depending on the connection/object selected. These include:
-
Auto-refresh related models on successful upload: If checked, when the file uploads, Nintex Apps will automatically identify models that are displaying data and requery.
Important: Any unsaved changes on that model will be lost.
- Parent folder ID: The ID of the folder where the file will be uploaded. ( Google Drive )
- Snippet to run on completion (optional): Name of a Javascript snippet to run on completion of the upload.
Salesforce objects have several File storage location choices that may not be available when using other connectors; when chosen, these File storage locations cause Nintex Apps to display other properties.
-
In attachment to record: The file will be uploaded as an attachment to the record, stored in the Attachment object, and linked to the Parent ID of the record in context.
Need to see the list of attachments that have been uploaded? Create a model on the Attachments object, and add a table see all attachments listed.
Note: Not recommended for use with Lightning Experience. See Using File Upload with Lightning Experience for more information.
- Custom owner ID field: The field that you want to be the "owner ID" of that attachment. By default, whoever is uploading the attachment "owns" it. Select the object's Owner ID for this field, and when you upload a file to an account owned by someone else, that Owner will automatically be designated attachment owner.
-
In Chatter Feed item: The file will be uploaded to the user's associated Chatter Feed and added to the Chatter field for the object associated with the model.
- Feed text: The text that will accompany the attachment in the Chatter posts.
-
In field on record: The file will be uploaded to an image field on a record.
-
Display as:
- File name: After the file uploads, the filename displays on the screen. For image files, end users may be able to click the filename to open a preview of the file.
- File preview/image: For use with image files, after the file uploads, the image itself displays on the screen.
- Default image: The default image (Person or Org) to display before an actual image is uploaded.
-
Field name: The object's field where the attachment is stored.
Note: Only the model's reference fields can be chosen to store the uploaded file.
- Allow editing: If checked, an edit icon appears on the file preview allowing end users to replace the file with another.
- Allow removal: If checked, a delete icon appears on the file preview allowing end users to remove the file.
-
-
In content document (with record context): The file will be uploaded to and stored in the Content Document object, with a link to the ID of the record in context as the value of the Linked Entity ID field—allowing the file to be properly associated with that record. This allows users to view the list of uploaded documents in the Content Document object, and search for objects by record ID.
Note: Context is typically provided by using the File Upload component within a row's drawer. If a parent model is specified, but no row-level context is provided—as is common on detail pages— the first row within the parent model is used to provide context.
Note:To view files uploaded to the ContentDocumentobject, you'll need a Nintex Apps model for the ContentDocumentLink object. This is the likely scenario for files uploaded through the File Upload component using the File Storage Location property set to the In Content Document (with Record Context) value.
A Nintex Apps model query on the ContentDocumentobject does not return the expected results due to the specialized configuration of the object.
To view ContentDocument object files in a data component (such as Table or Deck), it's necessary to have a model on the ContentDocumentLinkobject with, at minimum, the ContentDocument ID reference field and the Linked Entity IDreference field.
- File description: Short descriptive text for uploaded files.
- Auto-refresh related models on successful upload: If checked, when the file uploads, Nintex Apps will automatically identify models that are displaying data and requery.
Important: Any unsaved changes on that model will be lost.
- On-upload success actions:
- Click Add action.
- Click the new the created action, then edit:
- Action Type: Use the Action Framework to launch actions that run if the file uploads successfully.
- On-upload failure actions:
- Click Add action.
- Click the new the created action, then edit:
- Action Type: Use the Action Framework to launch actions that run if the file fails to upload.
-
Style variant: Style variants are created and set in the Design System Studio. Some components have pre-defined variants for a specific aspect of a component's style. Also, Nintex Apps builders can style and customize elements to create their own themes within the DSS. These themes will dynamically populate as selectable values in the Style Variant dropdown menu.
Note:To refresh available style variant options, click
Refresh style variants.This is useful for when changes to the design system (like style variants or variable options) have been made in another browser window or by another user.
-
Margin: Sets a component's margin (the space around it) relative to other components on the page.
- To set margins for all sides, click border-all All.
- To set margins for each side individually, click border-separate Separate.
Margin values can be set to any configured spacing variable for the page's design system. Margin cannot be set an arbitrary value; it must use a design system variable.
Standard display logic options are available to display or hide the component or feature.
Troubleshooting
If attempting to attach a file to a new record that has not yet been saved to the database, the upload will fail. You must first save the record before attaching a file to the record.
Note: This behavior may require workarounds to create records and then upload files to them with the File Upload component, particularly with the Wizard component.