Widget Properties

The SmartVault widget is a mini-sized application that you can embed into your application. By embedding the SmartVault widget, you will provide your users with convenient access to their SmartVault account. They will be able to easily manage their files and folders as well as view or download documents right from your application.

This image below shows the SmartVault widget.

widget

To configure the widget, you will need to use a simple JSON structure that outlines the framework of your widget. Below are the descriptions of each widget property.
 
 
type


type
(string)
The display type of the widget. At this time, only the “Folder” type is supported. This is a required field.

 
 
target


target.pathType
(string)
Allows you to select a path from within the SmartVault hierarchy where the widget will be rooted For most usages, pth is the appropriate choice. This field is retired.

target.pth
(array)
This field is only required when target.pth is set to pth. It the path within the SmartVault hierarchy where the widget will be rooted. It supports template replacement variables. At this time, the only variable supported is the email address of the user who is logged into the widget, which may be expressed as: ${email}.

 
 
features


features.clearFinishedUploads
(boolean)
If true, causes entries fro uploading items to be removed after they are uploaded before the widget refreshes. It is not a required field.

features.copy
(boolean)
If true, widget displays controls to perform copy operations. Default is set to true and it is not a required field.

features.createFolder
(boolean)
If true, the widget displays controls that will allow the user to create folders. Default is set to true and it is not a required field.

features.delete
(boolean)
If true, the widget displays controls that allow the user to delete files and folders. Default is set to true and it is not a required field.

features.download
(boolean)
If true, the widget displays controls that allow the user to download files. Default is set to true and it is not a required field.

features.list
(boolean)
If true, the widget lists all the contents in the current folder. Default is set to true and it is not a required field.

features.logout
(boolean)
If true, the widget displays controls that allow the logged in user to log out. Default is set to true and it is not a required field.

features.move
(boolean)
If true, the widget displays controls that allow the user to move files and folders. Default is set to true and it is not a required field.

features.overwrite
(boolean)
If true, the widget will overwrite files in the case of name collision. Default is set to false and it is not a required field.

features.read
(boolean)
If true, the widget displays controls that allows the logged in user to preview documents. Default is set to true and it is not a required field.

features.refresh
(boolean)
If true, the widget displays controls that allow the user to refresh its content. Default is set to true and it is not a required field.

features.update
(boolean)
If true, the widget displays controls that allow the user to update metadata regarding the files (name, description, etc.). Default is set to true and it is not a required field.

features.upload
(boolean)
If true, the widget displays controls that allow the user to upload documents. Default is set to true and it is not a required field.

 
 
refresh


refresh.disable
(boolean)
If true, the widget will not refresh automatically refresh. Default is set to false and it is not a required field.

refresh.interval
(integer)
The amount of time, in seconds, between each refresh of the widget. Default is set to 60 and it is not a required field.

 
 
initialization


initialization.starln
(array)
This will allow you to specify a subfolder of the root to begin in, while still allowing the user to traverse back to the root folder. Default is set to null and it is not a required field.

initialization.skipAuthorization
(boolean)
If set to true, a user will only be asked to authorize the application when it is not logged on. Default is set to null and it is not a required field.

 
 
callbacks


callbacks.batchUploadComplete
(string)
This will allow you to specify a function to be called once a batch upload is complete. The first argument to the callback will be an array list of all the file names uploaded. Default is set to null and it is not a required field.

callbacks.busy
(string)
This will allow you to specify a function to be called when the widget changes to a busy state. The first argument to the callback will be the busy state as a boolean. Default is set to null and it is not a required field.

callbacks.fileUploadComplete
(string)
This will allow you to specify a function to be called when a file has finished uploading. The first argument to the callback will be the name of the uploaded file. Default is set to null and it is not a required field.

callbacks.fileUploadError
(string)
This will allow you to specify a function to be called when an error occurs while uploading a file. The first argument to the callback will be the name of the file. Default is set to null and it is not a required field.

callbacks.ignoreLock
(string)
This will allow you to specify a function to be called if the widget tries to lock navigation during upload. The first argument to the callback will be a boolean indicating whether the lock behavior should be ignored. Default is set to null and it is not a required field.

callbacks.updateFeatures
(string)
This will allow you to specify a function to be called when a feature is accessed. The first argument to the callback will be a copy of the current state of the widget features. The widget then expects the callback to return an updated copy of that object with the changes you want to make. Default is set to null and it is not a required field.

 
 

Suggested Tutorial:

Integrating the SmartVault Widget
 
 

Leave A Comment?