Skip to content

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

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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