Get image from URL and store record
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā04-09-2023 11:04 PM
Hi all how to get an image from url in api and store in table form field.
The script include works for other but not for image. when its string field its showing url..I changed to image field type then,
How to get image

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā04-10-2023 12:48 AM
The API from which you are getting this information must be returning the image URL e.g. http://upload.wikimedia.org/wikipedia/commons/4/4a/Logo_2013_Google.png
You can store this URL and render it in your widget using img tag
<img src="http://upload.wikimedia.org/wikipedia/commons/4/4a/Logo_2013_Google.png" alt="Google Logo" width="500" height="600">
Or you can find out an API which could download image from the URL and convert it to Base64 format which can be stored within ServiceNow's sys_attachment and sys_attachment_doc tables.