🐛 Fix file upload
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user