webapp
webapp copied to clipboard
1077 Set 4MB size limit for images
#1077
Codecov Report
Attention: 39 lines
in your changes are missing coverage. Please review.
Comparison is base (
5f0f06c
) 13.73% compared to head (ce38557
) 13.85%.
Additional details and impacted files
@@ Coverage Diff @@
## main #1605 +/- ##
============================================
+ Coverage 13.73% 13.85% +0.11%
- Complexity 453 455 +2
============================================
Files 257 258 +1
Lines 8503 8476 -27
Branches 881 873 -8
============================================
+ Hits 1168 1174 +6
+ Misses 7284 7250 -34
- Partials 51 52 +1
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@tomaszsmy Do you think we should also reduce from 10MB to 4MB in Image.java
?
https://github.com/elimu-ai/webapp/blob/bf77a8f30d9996ba92ea917db68e5bb6ffceb8c0/src/main/java/ai/elimu/model/content/multimedia/Image.java#L19
@tomaszsmy Do you think we should also reduce from 10MB to 4MB in
Image.java
?https://github.com/elimu-ai/webapp/blob/bf77a8f30d9996ba92ea917db68e5bb6ffceb8c0/src/main/java/ai/elimu/model/content/multimedia/Image.java#L19
I think that the change may cause error if in table are any data which has size > 4MB
I think that the change may cause error if in table are any data which has size > 4MB
@tomaszsmy Good point! And you're right, yes we do:
[webapp-eng]> SELECT id, LENGTH(bytes) FROM Image WHERE LENGTH(bytes) > 4194304;
+-----+---------------+
| id | LENGTH(bytes) |
+-----+---------------+
| 4 | 4901733 |
| 449 | 6144932 |
+-----+---------------+
2 rows in set (0.05 sec)
So we should leave it at 10MB.