- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
In ServiceNow Portal, I try to add all supported files list under the "Copy and past clipboard files here" in an Add Attachment Pop up. Any OOB is there or how can we make it
#portal #widget
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
You can actually see in the DOM (and in the controller that calls the modal) that the modal template comes from the file "sp_attachment_modal.html" and that it actually has a ng-if directive that shows the supported extensions
<script type="text/ng-template" id="sp_attachment_modal.html"><div class="modal-attachment-picker">
<div class="modal-attachment-picker">
<div class="modal-attachment-picker__header">
<h1 class="attachment-header-title modal-attachment-picker__header-title h4" id="attachment-header-title">Add
no viruses</h1><button type="button" class="close pull-right" ng-click="$dismiss()" title="Close modal"
data-toggle="tooltip" data-placement="bottom" aria-label="Close modal" autofocus="autofocus">×</button>
</div>
<div class="attachment-body modal-attachment-picker__body"><sp-attachment-picker
on-file-pick="fileSelectHandler($files)" ng-show="!loadingIndicator"></sp-attachment-picker>
<div class="modal-attachment-picker__progress-info" ng-show="loadingIndicator"><progress
class="modal-attachment-picker__progress"></progress><label>Uploading</label></div>
<div ng-if="supportedExtensions !== ''" ng-show="!loadingIndicator" class="modal-attachment-picker__supported">
<span>Supported:</span><span class="break-all">{{supportedExtensions}}</span></div>
</div>
</div>
</script>
So you can either create an angular ng-template (related list on widgets) with ID sp_attachment_modal.html and do your alterations in the template to override whatever you want in this modal.
Or add an attribute called supported-extensions with a string of your wanted extensions to your spAttachmentButton directive in your widget template
<sp-attachment-button modal="true" supported-extensions="exe, bat, sh"></sp-attachment-button>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @AlwinJebakY,
it's not clear to me.. do you want to add the attachment section to your form, hide it, enable drag and drop, enabled/disable any specific file formats or what exactly is your requirement?
Sorry, but I need to understand your struggle before giving you and meaningful suggestion..
/* If my response wasn’t a total disaster ↙️ ⭐ drop a Kudos or Accept as Solution ✅ ↘️ Cheers! */
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @GlideFather
This Add Attachment Pop up is shown in Portal, I need to Add list of accepted files format below the Add Attachments Title
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @GlideFather
See this Screenshot, This Screenshot from Service Portal
Here i need to add the Supported attachment file formats like .jpg, .pdf below the Add Attachment Title
Any OOB is there or how we can do it
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
See this Screenshot, It was taken from Portal
My Expectation is need to show the list of accepted attachments on below the Add Attachments Title
Like Accepted formats are .jpg, .pdf etc.,
Is there any OOB is there or how to customize it?
