Uploading files and JSON data in the same request with Angular
Add the following HTML template with form in the component.html
Add the following code to upload the image in the component.ts file
async documentPhoto(event:any){
let data = new FormData();
data.append("imgfile", event.target.files[0]);
let res:any =await this.custService.uploadImages(data);
this.imgaepath=res.data;
}
Subscribe to:
Post Comments (Atom)
Make new Model/Controller/Migration in Laravel
In this article, we have included steps to create a model and controller or resource controller with the help of command line(CLI). Here w...
-
React router is a standard library to navigate among various components in a React application . It allows changing the browser URL and keep...
-
Deploying an application for real-time users is the most crucial part of software development . If anything goes wrong at this point, your e...
-
How to make dependent another dropdown for filter in angular To build a cascading dropdown, we have to take two dropdown. Add ...
No comments:
Post a Comment