♻️ Better file upload

This commit is contained in:
2025-10-02 01:13:41 +08:00
parent 3bfc0b8181
commit 8fe3a664a6
23 changed files with 293 additions and 383 deletions

View File

@@ -14,6 +14,7 @@ sealed class UniversalFile with _$UniversalFile {
required dynamic data,
required UniversalFileType type,
@Default(false) bool isLink,
String? displayName,
}) = _UniversalFile;
factory UniversalFile.fromJson(Map<String, dynamic> json) =>
@@ -31,6 +32,7 @@ sealed class UniversalFile with _$UniversalFile {
'video' => UniversalFileType.video,
_ => UniversalFileType.file,
},
displayName: attachment.name,
);
}
}