Passing in crop: { aspectRatio: 4 / 3, force: true } in the transformationOptions should enforce the crop before a user uploads the image.
Current Behavior
A user has to click SAVE and then UPLOAD before the crop gets applied. The callback onFileUploadFinished triggers long before the crop is applied, which causes the image to be uploaded uncropped and when a user then exits out of the UI (using the close button in the top right), they are left with the uncropped image (rather than the forced cropped version).
Possible Solution
The transformationOptions should apply before the image is uploaded as per the code comment here.
Steps to Reproduce (for bugs)
Open the picker and select an image.
Crop the image but then don't click upload / instead click the X icon in the top right
You are left with an uncropped image
Additional Screenshots
The picker is open and the crop is overlaid
A user clicks X in the top right
The image is uncropped but should have been cropped before uploading
Context
We use the Filestack Picker to allow users to upload an image that shows what their event is all about. To ensure the integrity of our events page, we need all images to be adhere to the same aspect ratio. When a user exits the filepicker, they shouldn't be able to bypass the forced cropping.
Your Environment
Version used: 3.25.0
Browser Name and version: All browsers
Operating System and version (desktop or mobile): Desktop & Mobile
Link to your project: It's a private repo but you can sign up for hellorevel.com to create an event if you're a woman over 40 😉
Expected Behavior
Passing in
crop: { aspectRatio: 4 / 3, force: true }
in thetransformationOptions
should enforce the crop before a user uploads the image.Current Behavior
A user has to click SAVE and then UPLOAD before the crop gets applied. The callback
onFileUploadFinished
triggers long before the crop is applied, which causes the image to be uploaded uncropped and when a user then exits out of the UI (using the close button in the top right), they are left with the uncropped image (rather than the forced cropped version).Possible Solution
The
transformationOptions
should apply before the image is uploaded as per the code comment here.Steps to Reproduce (for bugs)
Additional Screenshots
Context
We use the Filestack Picker to allow users to upload an image that shows what their event is all about. To ensure the integrity of our events page, we need all images to be adhere to the same aspect ratio. When a user exits the filepicker, they shouldn't be able to bypass the forced cropping.
Your Environment