This guide works fine & correctly only if I have any other sources passed before custom source in fromSources array:
For example
1) These options work fine:
const options = {
fromSources: [ 'local_file_system', myNewCustomSource ] // <-- this one works fine, but if I change it to `[ myNewCustomSource, 'local_file_system' ]` it stops working
maxFiles: 20,
uploadInBackground: false,
onUploadDone: (res) => console.log(res),
};
2) These options don't work:
const options = {
fromSources: [ myNewCustomSource ] // <-- only one single custom source fails
maxFiles: 20,
uploadInBackground: false,
onUploadDone: (res) => console.log(res),
};
The 2nd example throws validation errors like:
additionalProperty "label" exists in instance when not allowed (and there are more same errors but about name / icon / mounted props
is not one of enum values: local_file_system,url,i…usiness,clouddrive ...
Hi! I'm trying to create a picker with only custom source, I use this guide: https://www.filestack.com/docs/tutorials/picker-custom-source/
This guide works fine & correctly only if I have any other sources passed before custom source in
fromSources
array:For example 1) These options work fine:
2) These options don't work:
The 2nd example throws validation errors like:
additionalProperty "label" exists in instance when not allowed
(and there are more same errors but aboutname / icon / mounted
propsis not one of enum values: local_file_system,url,i…usiness,clouddrive ...
Here is the codesandbox with the bug: https://codesandbox.io/s/dawn-darkness-vd9yv5?file=/src/index.js:4808-4814
Expected Behavior
Single custom source should work without validation errors
Current Behavior
The 2nd example throws validation errors like:
additionalProperty "label" exists in instance when not allowed
(and there are more same errors but aboutname / icon / mounted
propsis not one of enum values: local_file_system,url,i…usiness,clouddrive ...
Possible Solution
Steps to Reproduce (for bugs)
Described above Here is the codesandbox with the bug: https://codesandbox.io/s/dawn-darkness-vd9yv5?file=/src/index.js:4808-4814
Additional Screenshots
Context
Your Environment
YOUR_APIKEY
with api key of the file stack_