I'm developing an application and I came across the following problem:
I'm working with an api that manages a website and I have some endpoints like: banners , testimonials , user / strong> etc, most endpoints have some relation to images , so I decided to create a images endpoint to centralize uploads, all images are sent to this endpoint images where the necessary validations are done.
When I am going to perform some registration that needs images, I first register the image in the images endpoint that returns an array with the ids of the database records where I keep the directories, the site is angled, I created a fileinput
component to receive the images, this component has a serviceA
that connects with the api in the endpoit images, my doubt falls here: after the image is sent to the server and me returned the ids; who has access is serviceA
of fileinput
, however I complete the register with componentB
that uses serviceB
how can I do to bring the return of serviceA
into serviceB
? p>