Prevent download of attachment

Kim Kronborg
Kilo Expert

I have a form with a "Manage Attachments" link and a "[view]" link to a document attached. The view link opens in a new window so the user can see the document which is fine. But the "Manage Attachments" link downloads the attached document to the users pc and I want to prevent that.

How can I disable this ?

Is it possible to remove the "Manage Attachments" link and just leave the "view" link on the form ?

Thanks

/Kim

9 REPLIES 9

Chuck Tomasi
Tera Patron

Hi Kim,



Not really. In many cases, the file may not be viewable by the browser (e.g. a ZIP file.) For things like JPG images, it technically already downloaded anyway when you see it in a view window. All the user has to do at that point is right-click and save the image to their hard drive.


Deepa Srivastav
Kilo Sage

Hi   Kim,



Please check below.


Mark Correct if it solved your issue or hit Like and Helpful if you find my response worthy.



Thanks,
Deepa



How to hide manage attachments button on record producer


Re: Limit visibility of Manage Attachments button on forms


akashsrm100
Kilo Guru

Hi kim


I think this will be the solution for what you asked.


For certain role you can disable that button but icon will be visible.



gel('header_add_attachment').disabled = true;



find_real_file.png



Thanks


Akash Sharma


PS hit Like Correct if helps


FYI - The modern way to do that, Akash, is to use g_form.disableAttachments().



GlideForm (g form) - ServiceNow Wiki



That doesn't quite fit Kim's original requirement to only prevent downloading of files. It disables uploads as well.