This feature prepends arbitrary text to the name of files uploaded via the Dropzone Widget.
In the below examples, an existing ticket ID is prepended to the uploaded file(s). Please note this example only works for replies to existing tickets via the Zendesk or Freshdesk Help Center. It does not work for new tickets, as the ticket ID is not established at the point of file submission.
To “turn on” this feature, customize your Help Center JavaScript as shown below:
Zendesk
Follow standard Zendesk Widget implementation guidance here: https://sendsafely.zendesk.com/hc/en-us/articles/360035678491-Installing-the-Portal-Widget-for-Zendesk
To prepend an existing ticket ID to uploaded files using the new filePrefix option, add the below code in bold to script.js
if (typeof SendSafelyZendesk === 'function')
{
var dropzoneId = 'my-dropzone-id';
//Create a new instance.
var sendsafely = new SendSafelyZendesk(dropzoneId);
//The following line should reflect the URL for your SendSafely portal.
sendsafely.api.url = 'https://demo2-stage.sendsafely.com';
var ticketId = window.location.pathname.substr(window.location.pathname.lastIndexOf('/') + 1);
if(ticketId !== 'new') {
sendsafely.api.filePrefix = ticketId;
}
sendsafely.initialize();
}
Freshdesk
Follow standard Freshdesk Widget implement guidance here: https://sendsafely.zendesk.com/hc/en-us/articles/360033095111-Installing-the-Portal-Widget-for-Freshdesk
To prepend an existing ticket ID to uploaded files using the new filePrefix option, add the below code in bold to Page layout
<script>
if (typeof SendSafelyFreshdesk === 'function')
{
var dropzoneId = 'my-dropzone-id';
//Create a new instance.
var sendsafely = new SendSafelyFreshdesk(dropzoneId);
sendsafely.api.url = 'https://demo2-stage.sendsafely.com';
var ticketId = window.location.pathname.substr(window.location.pathname.lastIndexOf('/') + 1);
if(ticketId !== 'new') {
sendsafely.api.filePrefix = ticketId;
}
sendsafely.initialize();
}
</script>
Comments
0 comments
Article is closed for comments.