Is there a simple way to use the Upload plugin's url upload function in a local plugin?

System Information
  • Strapi Version: 3.6.8
  • Operating System: Win 10
  • Database: SQLite3
  • Node Version: 14.0.0
  • NPM Version: 6.14.4
  • Yarn Version: 1.22.17

Hi there,

I am currently developing a local plugin which pulls some data from a given URL and adds that to a Content-Type. Currently, one of the pieces of data that my local plugin pulls is the URL of an image and stores that in my Content-Type.

I noticed that the Strapi Upload plugin has an “Upload from URL” functionality and having tried it by copying and pasting the image URL from the entry created by my local plugin, that functionality is exactly what I need.

However, I would like to know if I can send the URL I recieve from my local plugin directly to the Strapi Upload plugin after which the image which that URL points to will be added to the media library and I can add that to my Content-Type entry instead of the image URL? I noticed in the documentation it is described that I could upload files using the /upload endpoint, however it is expecting a file. Simply put, is there a way I could send an image URL to the /upload endpoint and have that image added to the media library?

I hope I have explained well enough. Thank you for any help.

To add some extra info or context about this you can view my plugin files here: strapi-plugins/plugins/news-fetcher at master · CaeCur/strapi-plugins · GitHub