Skip to content

Conversation

jackjocross
Copy link

No description provided.

let hasFile = false;
{{#formParams}}
{{#isFile}}hasFile = true;
{{/isFile}}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be a ternary?

let data: any;

if (hasFile) {
headers = { 'Content-Type': 'multipart/form-data' };

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As we learned, I think you want to leave this header off and let FormData apply the header itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants