Skip to content

Add the option to skip form data insertion (won't change default functionality) #163

@ioan-pop

Description

@ioan-pop

The extra form data that is inserted for files can cause issues on the other hand, I suggest adding a optional property of "skipFormData" (Boolean) to the uploader object. Example:

const uploader = EmberUploader.Uploader.create({
    url: this.get('url'),
    method: "PATCH",
    skipFormData: true
);

Then inside the /addon/uploaders/base.js on line 63 the data can be changed to be:

const data   = !get(this, 'skipFormData') ? this.createFormData(files, extra) : files;

This will skip the form data if the property is set to true, and create the form data if the property is set to false, or is not present.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions