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...
-
Implementation of firebase auth along with provider in Flutter , a state management helper that provides varieties of widgets to make attra...
-
Before we get into the technicality of using RTK Query in place of React query, let's understand the basics and know what actually RTK Q...
-
How to access the state using Redux RTK in React native app? In our previous blogs, we have learned to create a simple app with React.js ,...
No comments:
Post a Comment