Posting an image using a URL from an API call

Hi

Yes, you have an option to do this

const image = await axios.post(`${strapi_URL}/upload`, <image>, {
        headers: {
          Authorization: `Bearer ${user.jwt}`,
        },
      })

      const imageId = image.data[0].id

By using this code you can store your image in upload entity, it will give you image object.
Then you will be able to set imageId to your API

1 Like