Defining the bulk operation requirements
In web applications, a bulk operation is represented by one action or event; however, in the background, there are two possible behaviors:
- Running one network request for all the tasks
- Running parallel network requests for every task
In this chapter, we will be using the second behavior. We want to allow the user to upload the recipe images at once, track the progress of the upload operation, and display a progress bar to the user. We can see what this will look like here:
Figure 11.1 – Uploading the recipe’s images
In the RecipeCreation
interface, we will be changing the layout of the ImageUrl field to the File Upload layout available in our library of components, PrimeNG, as shown in the screenshot. The File Upload layout allows the user to choose multiple files, clear the selection, and upload the files.
The upload will be done on the server, and we have a specific service...