Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to specify input name #71

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

abudawud
Copy link

@abudawud abudawud commented Apr 6, 2023

Add input name filed with modifying the filepond ondata method. Here is the example

FilePond.create(document.querySelector('input.photo-file'), {
    labelIdle: 'Drag & Drop Gambar Varietas atau <span class="filepond--label-action"> Browse </span>',
    acceptedFileTypes: 'image/*',
      server: {
        url: "{{ route('filepond.chunk') }}",
        process: {
            url: '/process',
            ondata: function (form) {
                form.append('input_name', 'photo_file');
                return form;
            }
        },
        revert: '/process',
        patch: "?patch=",
        headers: {
          'X-CSRF-TOKEN': '{{ csrf_token() }}'
        }
      }
})

Refer to: https://pqina.nl/filepond/docs/api/server/#object-configuration

Solve issue #67

Add input name filed with modifying the filepond ondata method.
Refer to: https://pqina.nl/filepond/docs/api/server/#object-configuration
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.

None yet

1 participant