- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-22-2017 09:20 AM
When uploading an attachment to a ticket, either when ordering via the service catalog or the ticket view, there doesn't appear to be a way no notify users that the file-type is blocked. This applies to both the platform side and the service portal side.
We are restricting attachments via these two sys_properties
- glide.attachment.extensions - List of file extensions (comma-separated) that can be attached to documents via the attachment dialog.
- glide.security.file.mime_type.validation - This property must be set to activate MIME type checking for uploads. File extensions configured via glide.attachment.extensions will be checked for MIME type during upload.
There doesn't appear to be an OOTB setup to notify users that the file-type is restricted.
Has anyone come up with a method for this?
Solved! Go to Solution.
- Labels:
-
Service Portal Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-22-2017 10:23 AM
I've created a widget for now, but if someone has a more complete solution I'd love to hear about it. While it's not the most elegant solution, it's at least something to present to end-users on a few portal pages.
Widget: Allowed File Types
HTML Template
<div ng-if="data.fileTypes" class="panel panel-{{options.color}} b">
<div class="panel-heading">
<h4 class="panel-title">${Allowed File Types}</h4>
</div>
<div class="panel-body">
{{data.fileTypes}}
</div>
</div>
Client Script
function() {
/* widget controller */
var c = this;
}
Server Script
(function() {
/* populate the 'data' object */
/* e.g., data.table = $sp.getValue('table'); */
options.color = options.color || "primary";
var extensions = gs.getProperty('glide.attachment.extensions');
var fileTypes = extensions.split(',').join(' ');
data.fileTypes = fileTypes;
})();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-22-2017 10:23 AM
I've created a widget for now, but if someone has a more complete solution I'd love to hear about it. While it's not the most elegant solution, it's at least something to present to end-users on a few portal pages.
Widget: Allowed File Types
HTML Template
<div ng-if="data.fileTypes" class="panel panel-{{options.color}} b">
<div class="panel-heading">
<h4 class="panel-title">${Allowed File Types}</h4>
</div>
<div class="panel-body">
{{data.fileTypes}}
</div>
</div>
Client Script
function() {
/* widget controller */
var c = this;
}
Server Script
(function() {
/* populate the 'data' object */
/* e.g., data.table = $sp.getValue('table'); */
options.color = options.color || "primary";
var extensions = gs.getProperty('glide.attachment.extensions');
var fileTypes = extensions.split(',').join(' ');
data.fileTypes = fileTypes;
})();