Online Help Center > SendSafely APIs

SendSafelyDropzone.js

The SendSafely Dropzone allows anonymous users to upload files to a given set of recipients

SendSafelyDropzone(dropzoneId, domElement, urlElement)
Return Type: Constructor
The only constructor for the library.
Parameters:
NameTypeDescription
dropzoneId String The Dropzone ID which will be used to connect to SendSafely
domElement jQuery Element A jQuery element specifying where the DropZone should be injected
urlElement jQuery Element A jQuery element representing a field to where the secure link will be automatically inserted. Only required if the disableAutoSubmit flag is not set.
Raised Events: N/A

initialize()
Return Type: void
Initialize the DropZone. Calling the initialize function will create and inject a new DropZone into the domElement specified in the constructor.
Parameters: N/A
Raised Events: N/A

finializePackage(callback)
Return Type: void
Asynchronous function to manually finalize a package once all files have been uploaded. Only call this function when the disableAutoSubmit flag has been manually set.
Parameters:
NameTypeDescription
callback function A callback function containing the secure link
Raised Events: N/A

Additional Settings
NameTypeDescription
url Specify the URL to where the API will connect. This will default to https://app.sendsafely.com. Normally this will only need to be changed if your Organization instance is hosted outside outside of the US (IE https://my-app.sendsafely.co.uk)
INJECTED_TEXT Specify the text to be included in the field where the secure link is inserted. The secure link will be inserted into the {url} section. Defaults to "This ticket contains files uploaded using SendSafely. To view the attachments go to the below link:\n {url}"
BACKGROUND_COLOR Specify the background color of the DropZone.
DROP_TEXT_COLOR Specify the text color used within the DropZone.
WIDTH Specify the width of the DropZone. Defaults to 100% but can be set to any percent or pixel value.
disableAutoSubmit Disable or enable auto submit. If auto submit is enabled, the finalizePackage function will automatically be called when a form on the page is submitted. If disabled, the user will have to call that function manually.
setUnconfirmedSender Capture the unverified email address of the Dropzone submitter. When logged into the SendSafely web portal and viewing the package, this option will show the unverified email address of the user that submitted the files.