onFileCropped not working in the pickerOptions
See original GitHub issueI got an error " Uncaught Error: Invalid picker params" when I added onFileCropped option. Here is my react code snippet.
<PickerOverlay
apikey={FILESTACK_API_KEY}
pickerOptions={{
accept: ['image/*', 'image/jpeg'],
exposeOriginalFile: true,
imageMax: imageMax || undefined,
imageMin: imageMin || undefined,
onFileCropped: checkImageSize,
onFileSelected: checkImageSize,
onFileUploadStarted: () => {},
onFileUploadFinished: () => {},
onFileUploadFailed: () => { },
onClose: () => {}
}}
onSuccess={(res) => { }}
/>
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
`onFileCropped` callback throws an error · Issue #363 · filestack ...
Hello, when adding a onFileCropped callback to the Picker options, I get a Uncaught Error: Invalid picker params error. Every other callback (onFileSelected ......
Read more >PickerOptions | filestack-js
Default is active only on local file source. ... The output will not be exactly 800x600 unless the imageMax matches the aspect ......
Read more >pickerOptions: Options for 'pickerInput' in shinyWidgets - Rdrr.io
The function must return a string. Type: string | function; Default: function. The text on the button that deselects all options when actionsBox...
Read more >filestack-js/CHANGELOG.md - UNPKG
20, * **picker:** Add onFileCropped callback ... 30, * **file_tools:** Fix problems with uploading large files ...
Read more >filestack-js | Yarn - Package Manager
picker: Fix picker problems with cropFiles, erorrHandlers, add better mime detection (9dbe806); pickerOptions: add support email to picker options (09d40b0) ...
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 FreeTop 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
Top GitHub Comments
It should working in new release please check https://jsfiddle.net/pcholuj/54qhx8tL/2/
Hi @maryfs I am using jspicker for web
included following file.
//static.filestackapi.com/filestack-js/3.x.x/filestack.min.js
I tried to change this //static.filestackapi.com/filestack-js/3.21.0/filestack.min.js
my options are
When I remove the
onFileCropped
option with callback it worked fine, but with theonFileCropped
its not working.please also note that I am adding other options after clicking a button.
options["transformations"]["crop"] = { aspectRatio: for_width / for_height, force: true, }; client.picker(options).open();
can you please tell me is there anything I need to do to make this working ? its showing me the error ‘Uncaught Error: Invalid picker params’
Thanks