Skip to content

fileFormDataName seemingly ignored #1024

Closed
@adamreisnz

Description

@adamreisnz

On my local machine, when I specify the config option fileFormDataName with a value of logo, I get the following request sent to the server:

------WebKitFormBoundary595YPR0mPFV4GX4r
Content-Disposition: form-data; name="logo"; filename="avatar_2.jpg"
Content-Type: image/jpeg
------WebKitFormBoundary595YPR0mPFV4GX4r--

As you can see, the file name is correctly logo.

However, after deploying the exact same code in another environment, the config option is suddenly ignored, and it reverts back to file:

------WebKitFormBoundaryO2geiLg6gk2TFUst
Content-Disposition: form-data; name="file"; filename="avatar_2.jpg"
Content-Type: image/jpeg
------WebKitFormBoundaryO2geiLg6gk2TFUst--

Any idea what could be happening here? The only difference is that the code is being minified, but it's still passing the correct config option to the uploader:

o.upload({
  url: l.api.baseUrl + "organisation/logo",
  file: n,
  fileFormDataName: "logo"
  }).then(...)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions