nowAttachmentHandler - Restrict File Type Selection

raprohaska
Kilo Guru

We have a custom Service Portal that we are providing the ability for content creators to upload images directly in our custom widget. We are using nowAttachmentHandler. Right now we are doing custom checks that they only upload specific types of files. Is there a way to tell the file picker to only accept specified file types? I have found very little official documentation on nowAttachmentHandler.

Thanks in advance,
AA

1 ACCEPTED SOLUTION

raprohaska
Kilo Guru

Okay, figured it out, in the file input, you can list what can be accepted...

<input type="file" style="display: none" multiple="true" ng-file-select="dropFiles($files)" class="sp-attachments-input" accept="image/,.png,.jpg,.jpeg,.svg,.gif"/>

raprohaska_0-1674662623194.png

 

View solution in original post

1 REPLY 1

raprohaska
Kilo Guru

Okay, figured it out, in the file input, you can list what can be accepted...

<input type="file" style="display: none" multiple="true" ng-file-select="dropFiles($files)" class="sp-attachments-input" accept="image/,.png,.jpg,.jpeg,.svg,.gif"/>

raprohaska_0-1674662623194.png