feat(chat): files upload over HTTP before the prompt, up to 100 MiB each
This commit is contained in:
@@ -50,7 +50,11 @@ ChatPickedFile _file(
|
||||
String name,
|
||||
List<int> bytes, {
|
||||
String mime = 'text/plain',
|
||||
}) => ChatPickedFile(name: name, mime: mime, bytes: Uint8List.fromList(bytes));
|
||||
}) => ChatPickedFile(
|
||||
name: name,
|
||||
mime: mime,
|
||||
bytes: bytes is Uint8List ? bytes : Uint8List.fromList(bytes),
|
||||
);
|
||||
|
||||
Finder get _field => find.byKey(const Key('chat-composer-field'));
|
||||
|
||||
@@ -159,7 +163,7 @@ void main() {
|
||||
fake.paste([
|
||||
_file(
|
||||
'huge.bin',
|
||||
List<int>.filled(ChatAttachmentDraft.maxTotalBytes + 1, 0),
|
||||
Uint8List(ChatAttachmentDraft.maxTotalBytes + 1),
|
||||
mime: 'application/octet-stream',
|
||||
),
|
||||
]);
|
||||
@@ -184,7 +188,7 @@ void main() {
|
||||
_file('kept.txt', [1]),
|
||||
_file(
|
||||
'huge.bin',
|
||||
List<int>.filled(ChatAttachmentDraft.maxTotalBytes, 0),
|
||||
Uint8List(ChatAttachmentDraft.maxTotalBytes),
|
||||
mime: 'application/octet-stream',
|
||||
),
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user