rowy
rowy copied to clipboard
Image field settings - add ability to toggle compress on/off
Is your feature request related to a problem? Please describe. Currently we support compression by default for image field. Add ability for users to turn it off in the Image settings if they do not want a compression
An unknown error occurred when uploading an image using the image field.
https://github.com/rowyio/rowy/discussions/965
I solved it by deleting and creating a new project and enabling cloud storage. Now the image is uploading, but Rowy can't access it. Even though firebase rules allow access to it.
rules_version = '2'; service firebase.storage { match /b/{bucket}/o { match /{allPaths=**} { allow read, write: if request.auth.token.roles.size() > 0; } } }
@notsidney
I would like to work on it.
Hello @harinij
I created a new table with a column to upload images. Currently clicking the upload button directly opens the image browser and uploads directly on selecting the image. Do we want to create an intermediatory upload modal with an option to check/uncheck image compression? Or is there any other method we have thought of?
Hi @Abhishek-90 good point. It can be part of the "Column config" modal. Currently, this is disabled for the Image field. You can take a look at the Short text
field as an example and use the similar modal as that for the column config which has a check box for image compression. That way, user can configure if they want all the images to be compressed in that column or not. Once this setting is enabled in the column config, all the images uploaded in the column will have compression on. We can have compression ON by default on the config and it can be unchecked by the user to turn it off.
Okay @harinij , I have understood the approach. Currently, I am done setting up rowy locally and started debugging the code. I will keep updating on the progress here and clear my doubts on discord server
Hello @harinij, Please find update on this issue so far.
Changes Done:
I have enabled Column Config
for ImageFields
- I created a new Settings.tsx
component for image field and added the checkbox to turn on/off for image compression (default is on,please refer below screenshot)
Next Steps:
- When the checkbox is checked/unchecked I will store the appropriate boolean true/false using atom.
- Depending on this state returns I will apply compression.
Question: Once user checks/unchecks, how do we keep it consistent? should I use localStorage
to keep it consistent between different session? or should I store their preference in Firebase
?
Hi @Abhishek-90 I am facing an issue regarding image compress. So can you please explain it in brief.
@ankitprajapati08 Hello, what issue are you facing?