Guides
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,Ricky.Stroman@gmail.com,605-747-6709,46709 Travon Gateway,EG' + "\n", 5 '2,Ivory,Yundt,Desiree2@gmail.com,459-727-9328 x788,1032 Haley Point,TF' + "\n", 6 '3,Randy,Bruen,Isobel.Wisoky@hotmail.com,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}