feat: Add ability to bulk import contacts (#3026)
Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
parent
6129edce08
commit
bba2750975
10 changed files with 195 additions and 5 deletions
|
@ -52,6 +52,14 @@ class ContactAPI extends ApiClient {
|
|||
)}`;
|
||||
return axios.get(requestURL);
|
||||
}
|
||||
|
||||
importContacts(file) {
|
||||
const formData = new FormData();
|
||||
formData.append('import_file', file);
|
||||
return axios.post(`${this.url}/import`, formData, {
|
||||
headers: { 'Content-Type': 'multipart/form-data' },
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export default new ContactAPI();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue