Encryption OOB popup not visible in catalog item

rajibosss11
Tera Contributor

Hi, Can any one suggest this method is not popup OOb box with Encryption and Without encryption option while uploading the attachment

Widget Angle provide :spAttachmentUpload

Type : Service

 

function(spModal, $q, i18n) {
'use strict';
return {
uploadAttachments: function(attachmentHandler, files) {
if (!files || !files.length)
return;
if (!g_has_encryption_context) {
attachmentHandler.onFileSelect(files);
    alert('hello');
return;
}
var context = "";
var title = files.length > 1 ? i18n.getMessage("Encrypt attachments?") : i18n.getMessage("Encrypt attachment?");
spModal.open({
title: title,
shared: {files: files},
backdrop: 'static',
keyboard: false,
widget: 'encryption-context-picker',
buttons: [
{label: i18n.getMessage('Upload Without Encrypting'), value: "no"},
{label: i18n.getMessage('Upload and Encrypt'), primary: true, value: "yes"}
],
onSubmit: function() {
context = this.shared.context.value;
return $q(function(resolve, reject) {
resolve({status: "ok"});
});
}
}).then(function(clickedButton) {
if (clickedButton.value == "yes")
attachmentHandler.setEncryptionContext(context);
attachmentHandler.onFileSelect(files);
});
}
}
}

 

6 REPLIES 6

@rajibosss11 

if you have encryption enabled in your instance for attachments then it should come by default.

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

rajibosss11
Tera Contributor

 HI @Ankur Bawiskar  with Encryption and Without encryption option while uploading the attachment this is requirement in catalog item