How to use form-data

Comprehensive form-data code examples:

How to use form-data.default:

1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
}
async run() {
  throw new Error(`A command ${this.constructor.name} does not implement run().`);
}
formForFile(filePath) {
  const form = new import_form_data.default();
  const buf = import_fs.default.readFileSync(filePath);
  form.append("file", buf, import_path.default.basename(filePath));
  return form;
}

How to use form-data.append:

3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
            }
            index++;
        }


    } else {
        FormData.append(name, data);
    }
}