Reference

Upload Files

Depending on your setup, you might have already the file uploaded. In such cases, you can pass the File directly to importOK so that you skip the upload part of the import wizard. Here is an example, on how this can be achieved.

For illustration purposes, we are creating the file from scratch.

1const exampleFile = new File(
2 [
3 'id,first_name,last_name,email,phone,address,country' + "\n",
4 '1,Jarred,Barton,[email protected],605-747-6709,46709 Travon Gateway,EG' + "\n",
5 '2,Ivory,Yundt,[email protected],459-727-9328 x788,1032 Haley Point,TF' + "\n",
6 '3,Randy,Bruen,[email protected],364-899-5352,972 Fadel Shores,AI' + "\n",
7 ],
8 'contacts.csv',
9 { type: 'text/csv' }
10);

Then, you can pass the file to importOK, simple as that:

1{
2 uploadedFile: exampleFile,
3}

Start typing to search documentation and articles...

⌘K or Ctrl+K to open search

No results found for ""

Try different keywords or check your spelling.

Use ↑ ↓ arrow keys to navigate and Enter to select