Commit 19e89df
fix: clear oversized images from onboarding store during migration (calcom#27560)
* fix: clear oversized images from onboarding store during migration
This fixes the 429 errors caused by large images stored in IndexedDB
before PR calcom#27285 added cropping functionality.
Changes:
- Add version 1 to zustand persist config with migration function
- Migration clears images exceeding thresholds:
- Logos/avatars: 500KB (properly cropped are ~50-150KB)
- Banners: 1.5MB (properly cropped are ~200-500KB)
- Add comprehensive tests for migration logic
When users refresh the page, the migration runs automatically and
clears any oversized images, requiring them to re-upload using the
new cropping flow.
Co-Authored-By: hariom@cal.com <hariombalhara@gmail.com>
* fixes
* chore: remove migration test file
Co-Authored-By: hariom@cal.com <hariombalhara@gmail.com>
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>1 parent 7840cc3 commit 19e89df
1 file changed
Lines changed: 52 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
6 | 21 | | |
7 | 22 | | |
8 | 23 | | |
| |||
189 | 204 | | |
190 | 205 | | |
191 | 206 | | |
192 | | - | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
193 | 243 | | |
194 | 244 | | |
195 | 245 | | |
| |||
204 | 254 | | |
205 | 255 | | |
206 | 256 | | |
207 | | - | |
| 257 | + | |
208 | 258 | | |
209 | 259 | | |
0 commit comments