Full process for uploading files to the Files API

Hi,

thanks for an elaborate response.

But currently I am facing an issue while getting the request response headers from axios as it says : Property ‘getheaders’ does not exist on type ‘FormData’. in the following code:

Any help regarding this would be grateful.

const formData = new FormData();

    for (var param of target.parameters) {
      formData.append(param.name, param.value);
    }

    const blob = new Blob([fileData]);

    formData.append("file", blob);
    await axios.post(target.url, formData, {
      headers: {
        ...formData.getheaders()
        "Content-Type": "multipart/form-data",
      },