[shared-media] ignore unsupported file types
This commit is contained in:
parent
30cbebeada
commit
fd95bcdfe8
1 changed files with 6 additions and 0 deletions
|
@ -40,6 +40,12 @@ Future<List<File>> convertIncomingSharedMediaToFile(
|
|||
List<SharedMediaFile> sharedMedia, int collectionID) async {
|
||||
List<File> localFiles = [];
|
||||
for (var media in sharedMedia) {
|
||||
if (!(media.type == SharedMediaType.IMAGE ||
|
||||
media.type == SharedMediaType.VIDEO)) {
|
||||
_logger.warning(
|
||||
"ignore unsupported file type ${media.type.toString()} path: ${media.path}");
|
||||
continue;
|
||||
}
|
||||
var enteFile = File();
|
||||
// fileName: img_x.jpg
|
||||
enteFile.title = basename(media.path);
|
||||
|
|
Loading…
Add table
Reference in a new issue