🐛 Fix file upload

This commit is contained in:
2025-09-24 20:29:30 +08:00
parent 457d1bac60
commit 5f84751fd5
4 changed files with 9 additions and 36 deletions

View File

@@ -34,20 +34,4 @@ extension SnFilePoolList on List<SnFilePool> {
}
throw ArgumentError('Unexpected response format: $data');
}
List<SnFilePool> filterValid() {
return where((p) {
final accept = p.policyConfig?['accept_types'];
if (accept is List) {
final acceptsOnlyMedia = accept.every((t) =>
t is String &&
(t.startsWith('image/') ||
t.startsWith('video/') ||
t.startsWith('audio/')));
if (acceptsOnlyMedia) return false;
}
return true;
}).toList();
}
}