FilePond.setOptions is not a function
See original GitHub issueSummary
I can’t seem to use this syntax when using vue-filepound
with typescript to set a custom process function
FilePond.setOptions({
server: {
process(fieldName: any, file: any, metadata: any, load: any, error: any, progress: any, abort: any) {
// fieldName is the name of the input field
// file is the actual file object to send
console.log(fieldName, file, file.name);
// Should expose an abort method so the request can be cancelled
return {
abort: () => {
// Let FilePond know the request has been cancelled
abort();
},
};
}
}
});
I am getting the error FilePond.setOptions is not a function
How to reproduce
try to use FilePond.setOptions();
on a vue sigle file compoenet
Expected behavior
Set a custom process function that doesn’t upload the files anywhere.
Additional information
Environment | Version |
---|---|
OS | Windows 10 |
Browser | Chrome |
Issue Analytics
- State:
- Created 5 years ago
- Comments:7
Top Results From Across the Web
FilePond Documentation - PQINA
Connecting to a server We'll use the setOptions method to overwrite default server options for all FilePond instances on the page. In the...
Read more >FilePond override server.process on React - Stack Overflow
handleInit()} to the component. But, trying to call this.pond.setOptions fails with this.pond.setOptions is not a function. – Andrew Kennel.
Read more >How to use the filepond.supported function in filepond - Snyk
To help you get started, we've selected a few filepond.supported examples, ... Do this once const isSupported: boolean = supported(); // Methods not...
Read more >Livewire FilePond Clear after upload - Laracasts
Livewire FilePond Clear after upload ... setOptions({ server: { process: (fieldName, file, metadata, load, error, ... removeFile is not a function.
Read more >Filepond: A Flexible and Fun JavaScript File Upload Library
Responsive, automatically scales to available space, is functional on both mobile and desktop ... At the moment test coverage is not great, it's...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’m sorry, made a mistake,
vueFilePond
is a default export whilesetOptions
is a named export.I’ve run a quick test and the following works:
I’m not very familiar with TypeScript so if you are, PRs are welcome.
With Vue
FilePond
is a component so this doesn’t work.This should work: