how to copy a image from db_image to sys_attachment

haoranhuang
Tera Expert

i want to add attachments from images table as source ,but i try the GlideSysAttachment AIP,and there're can't work,

is there any other ways to achieve this problem

2 ACCEPTED SOLUTIONS

@haoranhuang 

check this link

Image from db_image to attach on a particular record 

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

View solution in original post

haoranhuang
Tera Expert
4 REPLIES 4

Ankur Bawiskar
Tera Patron
Tera Patron

@haoranhuang 

what's your business requirement here to copy image from db_image to attachment table?

which table record you wish to copy the image and when should this be triggered?

are you saying you want to copy image from db image to an image type field on some table?

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

Thank you for helping me clarify my thoughts

 

When users use a rich text editor, they can choose to insert images.
One way to select an image is to select it from the dbo image table and display it in rich text content.
Due to my business needs, I need to convert images into base64 encoding format. However, there is no relevant interface provided for the 'db_image' file. Therefore, I would like to save the images to the attachment table and use the provided interface to convert them into base64 encoding format

@haoranhuang 

check this link

Image from db_image to attach on a particular record 

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

haoranhuang
Tera Expert