Reading file content from attached file in HTML input type file

Sk Tousif Bakka
Tera Contributor

Hello,

I have a requirement to create a custom UI page where we can add attachments.

Onclick of the button, the custom Page pops up and we can add attachments there.

On submitting the attachment gets attached to the record. The reason for making the custom UI Page is to add a category to every attachment. We have a custom field in sys_attachment table to save the category.

find_real_file.png

This is the HTML code to get the attachment.

Now the attachment is being saved successfully in the client script. The only problem is that the content of the file is not getting retrieved. So a file of say size 180Mb when uploaded, the uploaded file size is only 13B

find_real_file.png

The main problem is that we are unable to read File Content.

Any help on how to read file content and pass it to the script include to save the attachment would be appreciated.

Regards,

Sk Tousif Bakkar

1 REPLY 1

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

Can you share the complete UI page script HTML, client script.

Regards
Ankur

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