feat(media): add flutter_image_compress for efficient image handling

This commit is contained in:
cogwheel
2025-12-22 11:20:00 +05:30
parent 83f890d6e4
commit 50ce1e51de
5 changed files with 190 additions and 15 deletions

View File

@@ -74,9 +74,8 @@ class TaskWorker {
}
Future<void> _performUploadMedia(UploadMediaTask task) async {
const imageExts = <String>{'.jpg', '.jpeg', '.png', '.gif', '.webp'};
final lowerName = task.fileName.toLowerCase();
final bool isImage = imageExts.any(lowerName.endsWith);
final bool isImage = allSupportedImageFormats.any(lowerName.endsWith);
// For images: read as base64 locally (matching web client behavior)
// Web client never uploads images to /api/v1/files/