You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<script>
importFilePond, { registerPlugin, supported } from'svelte-filepond';// Import the Image EXIF Orientation and Image Preview plugins// Note: These need to be installed separately// `npm i filepond-plugin-image-preview filepond-plugin-image-exif-orientation --save`importFilePondPluginImageExifOrientationfrom'filepond-plugin-image-exif-orientation';importFilePondPluginImagePreviewfrom'filepond-plugin-image-preview';// Register the pluginsregisterPlugin(FilePondPluginImageExifOrientation, FilePondPluginImagePreview);// a reference to the component, used to call FilePond methodslet pond;// pond.getFiles() will return the active files// the name to use for the internal file inputlet name ='filepond';// handle filepond eventsfunctionhandleInit() {console.log('FilePond has initialised'); }functionhandleAddFile(err, fileItem) {console.log('A file has been added', fileItem); }
</script>
<divclass="app">
<FilePondbind:this={pond}
{name}
server="http://localhost:8081/v1/model"allowMultiple={true}
oninit={handleInit}
onaddfile={handleAddFile}
/>
</div>
When I do i get a 500 error and the browser console tells me:
proxy.js?v=a2ce5f93:19 TypeError: FilePond.setOptions is not a function
at instance (+page.svelte:16:14)
at init (index.mjs:2165:11)
at new Page (+page.svelte:42:28)
at createComponent (svelte-hooks.js?v=a2ce5f93:206:20)
at targetCmp.$replace (svelte-hooks.js?v=a2ce5f93:269:15)
at refreshComponent (proxy.js?v=a2ce5f93:171:15)
at ProxyAdapterDom.rerender (proxy-adapter-dom.js?v=a2ce5f93:77:5)
at proxy.js?v=a2ce5f93:408:9
at Array.forEach (<anonymous>)
at Object.reload (proxy.js?v=a2ce5f93:406:15)
I have also tried it as: page.setOptions(....)
This also does not work.
However when I do not try to setOptions and just use the doc as is, it does seem to work. At least according to my server.
To Reproduce
Use this sveltekit page in a sveltekit app
Expected behavior
If I follow the docs it should work
As a side question, how can I style the fileset div. Mine looks pretty bad:
The text was updated successfully, but these errors were encountered:
Describe the bug
I have tried to follow the docs at https://pqina.nl/filepond/docs/api/server/#process to set server options. According to he docs I should put the following in my svelte script:
My svelte page looks like:
When I do i get a 500 error and the browser console tells me:
I have also tried it as:
page.setOptions(....)
This also does not work.
However when I do not try to setOptions and just use the doc as is, it does seem to work. At least according to my server.
To Reproduce
Use this sveltekit page in a sveltekit app
Expected behavior
If I follow the docs it should work
As a side question, how can I style the fileset div. Mine looks pretty bad:
![svelte](https://private-user-images.githubusercontent.com/5685054/253441228-6185847b-5562-4a4f-b54c-9f7615600c5a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk5NjA0OTgsIm5iZiI6MTcxOTk2MDE5OCwicGF0aCI6Ii81Njg1MDU0LzI1MzQ0MTIyOC02MTg1ODQ3Yi01NTYyLTRhNGYtYjU0Yy05Zjc2MTU2MDBjNWEucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcwMiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MDJUMjI0MzE4WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MmZjYWQ0YjI1NDg1MTg2MmYyMTc0NTEzOTFjZGQ2ODE0YmM0MmYzZWM3ODYwN2Y1MzVhMjVmMDcwNjk4ZjgzMCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ._i0N06FfH6DArcAS1h9DYn62kIum6nKvAtxN7IdLG0E)
The text was updated successfully, but these errors were encountered: