I am trying to figure out if it is possible out of the box to programatically import images from a external api/URL.
I have successfully gotten data from a rest API to import into strapi as content but I need to find a way to download images from links in the API.
I am not sure if there is any mechanism to do this but I figured I would ask.
response.data.value.forEach((item) => {
console.log("found: ", item.City);
strapi.db.query('api::property.property').create({
data: {
City: item.City,
//Images: "https://s3.amazonaws.com/images/63195f63-b06d-4432-8a9e-1de034a5fb6f.jpg",
},
});
});
})
The code above successfully creates content from api and imports the “City” value. I need to also import data into an image field.
Cheers