Uploads
Description
When users generate reports, they often want to share the files with others. They can send emails, or messages from within Ambience, with attachments, but sometimes they want a central repository that makes managing access rights easy. New staff won’t see last month’s email, but with the right permissions they will be able to download the file from Ambience.
The Ambience Uploads and Downloads modules provide a convenient mechanism for sharing any kind of document - anything from sales reports, powerpoint presentations to sample data files.
The Uploads module provides an interface to upload files in various formats. The files are uploaded by specifying the name of the file, with optional category, description and roles. Roles can be set to allow certain users to download the files.
Upload File
To upload a file, start by clicking on the “Upload” button on the upper right corner of the page.
The “Upload” dialog box appears.
Single File
Input Fields
Field | Description | Mandatory | Input Type | Constraints | Default Value |
---|---|---|---|---|---|
File | Browse to select file to be uploaded. | Y | Text field | Any text. | Empty string |
Name | Unique name assigned to the file to be uploaded. When a file is specified in the above field, this field will automatically takes in the file name of the specified file. |
Y | Text field | Any text | Empty string |
Overwrite | If selected, overwrites existing file. | N | Checkbox | - | Not selected |
Description | A brief description of the file to be uploaded. | N | Text field | Any text. | Empty string |
Category | Category assigned to the file to be uploaded. | N | Text field | Any text. | Empty string |
Browse to the location of the file to be uploaded and set the optional “Name”, “Description” and/or “Category” fields. Do note that the “Name” and “Category” combination must be unique, or an error message will appear.
Click on the “OK” button to upload. Click on the “Cancel” button to abort the action. A message will appear after the file has been successfully uploaded.
You can arrange/sort the uploaded files in ascending or descending order by clicking on the desired field. By default, the list is sorted by the “Name” field in ascending order.
Zip File
Browse to the location of the zip file to be uploaded. Once a zip file is detected, an extra field will appear in the dialog box.
To extract the individual files in the zip file during uploading, select the “Extract Zip” field. The “Description” and “Category” fields will be removed.
To upload the zip file as a zip, ignore the “Extract Zip” field.
The name of the files will be extracted from the zip file. Click on the “OK” button to upload the files. The “Upload Results” dialog box will display the results of the uploading.
Those results in black are uploaded successfully while those in red indicates upload failures with their relevant messages. Click on the “OK” button to overwrite the files that already exist (in red) or click on the “Cancel” button to just upload the new file (in black).
Refresh File
After performing actions on the browser/tab, the list is reloaded to display the uploaded files. The manual “Refresh” button is available and is particularly useful if there are others making changes on the same page.
The “Refresh” button is found on the upper right corner of the page. Clicking on it reloads the list of uploaded files.
Edit File
To modify an existing file’s attributes, click on the “Edit” icon under the “Actions” column corresponding to the desired file.
The “Edit” dialog box will appear with the selected file’s attributes. The same fields and constraints in Upload File are applied.
Click on the “Save” button to save the changes made to the existing file. Clicking on the “Cancel” button aborts the action.
Open in Browser
This feature allows you to open PDF, Excel and image files in the browser. To open the document, click on the name of the file under the “Name” column.
Copy Link
Copy link provides a URL of the selected file, which can be used to access it. To get the URL, click on the “Copy Link” icon of the selected file in the “Actions” column.
A notification will appear for about five seconds to inform you that the link has been copied to the clipboard.
Delete File
To delete an existing file, click on the “Delete” icon of the desired file under the “Actions” column corresponding to the desired file.
There is an option to undo the deletion. A notification with an “Undo” button appears right after clicking on the “Delete” icon.
Upon clicking on the “Undo” button, the deleted file is restored and is added back to the list of files. Do note that the notification will disappear after five seconds.
More Actions
This feature allows user to perform actions on multiple files at the same time.
When the “More Actions” button located at the upper right corner of the page is clicked, a list of available actions are displayed.
If no files is selected prior clicking the button, there will be fewer actions available. To select a file, select the checkbox next to the name of the file.
Option | Description |
---|---|
Select All | Selects all files in the list. |
Select None | Unselects all files. |
Invert Selection | Inverts the current selection. That is, any files selected will be unselected and vice versa. |
Set Roles | Selects the roles to be assigned to the files. |
Download | Downloads multiple files as a zip file. If only one file is selected, the selected file will be downloaded. |
Set Roles
To set the roles for the selected files, click on the “More Actions” button and select the “Set Roles” option. The “Set Roles” dialog box will appear.
Select the roles to have access to the files by selecting the checkboxes. Alternatively, you can search for the desired role by keying in the keyword in the search function at the top of the dialog box. You can also choose to select all, select none or invert selection by clicking on their respective icons on the right of the search function.
Click on the “OK” button to save the changes or click on the “Cancel” button to abort the action.
Download
To download the selected files, click on the “More Actions” button and select the “Download” option.
If only one file is selected, the file will be downloaded as it is.
If more than one file is selected prior, the “Download” dialog box will appear. Do note that only files of the same type can be downloaded as a zip file.
Key in the desired name for the zip file and click on the “OK” button. The selected files will be downloaded as a zip file with the filename provided earlier. The individual report in the zip file will have the filename format as mentioned above.
Search
There is a cross-field search function for the list of uploaded files. It is located at the upper left corner of the page.
This provides an easy way to search through the file list. It is case-insensitive and displays files that have the entered search value in any of the values of the fields below:
- Name
- Description
- Category
- Content Type
- File Size
- Upload Date
- Roles
- Owner
Alternatively, you can click on the any items under the “Category”, “Content Type”, “Roles” and/or “Owner” columns to aid the search for the files in the page.
In the example above, files that are categorized as “Bson” are shown.
These two search methods can be combined together, with each criteria separated by a comma.
Storage
By default, the uploaded files are stored in the UploadDownloadChunk
collection in ambience
database.
To allow the uploaded files to be stored in the BinaryStore, add the following line in the application.conf
file:
ambience.modules.upload.store = "default-large"
This will place the uploaded files to be stored in the database ambience
, BinaryStoreChunk
collection.
Any existing uploads in the Ambience specific collection prior to the switch to BinaryStore, the system will still be able to find the previous items in the collection and vice versa.
The system will still be able to find any uploads in the UploadDownloadChunk
collection prior to the switch to BinaryStore and vice versa.