Filepond: How to add something data to formData

Created on 20 Feb 2019  路  6Comments  路  Source: pqina/filepond

Hi!
I need help with additional some data to formData in react, I cant use headers for send external data.
Thank you.

Most helpful comment

Hi, thanks for using FilePond! Please use StackOverflow to ask questions about FilePond.

edit: it's right there in the issue template

All 6 comments

Hi, thanks for using FilePond! Please use StackOverflow to ask questions about FilePond.

edit: it's right there in the issue template

Please use StackOverflow to ask questions about FilePond.

Whattt??????

Hi!
I need help with additional some data to formData in react, I cant use headers for send external data.
Thank you.

Hi Strenget please try this

ondata: (formData) => {
                formData.append('Hello', 'World');
                return formData;
            }

full server object looks like this

server: {
        url: 'http://192.168.0.100',
        timeout: 7000,
        process: {
            url: './process',
            method: 'POST',
            headers: {
                'x-customheader': 'Hello World'
            },
            withCredentials: false,
            onload: (response) => response.key,
            onerror: (response) => response.data,
            ondata: (formData) => {
                formData.append('Hello', 'World');
                return formData;
            }
        },
        revert: './revert',
        restore: './restore/',
        load: './load/',
        fetch: './fetch/'
    }

it works for me

Please use StackOverflow to ask questions about FilePond.

Whattt??????

There's an issue template to adhere to when submitting a new issue, if a new issue doesn't follow the template, it's closed.

Managing issues is a tedious task. Managing issues that are severely lacking in details is even more taxing. The more time the developer spends on describing the new issue the easier it is to help out.

In this case:

I need help with additional some data to formData in react, I cant use headers for send external data.

What is missing:

  • Why can't the headers be used
  • Is there a problem with using the headers
  • What errors are thrown, if any?
  • What has the developer tried
  • A well formatted code snippet related to the issue
  • Which browsers does the issue happen on, all, none, some, which versions
  • Which device and OS is the dev testing on
  • Which version of FilePond was this tested with
  • Is this with an adapter of FilePond or the vanilla version
  • etc.

Questions are to be asked on Stack Overflow as they are often project specific. I regularly browse Stack Overflow for FilePond issues and will answer them if they are detailed enough.

You can ask for more details, and wait until you get more detail, if they respond, answer the query if they don't you are free to ignore this issue and close this with tag incomplete details given,

@hanzlahabib, Maybe since @rikschennink coded and offered the module for free to the community and the people that are using it can make a tiny weeny bit of effort by respecting the authors guideline on asking a question ? Don't you think ?

Was this page helpful?
0 / 5 - 0 ratings