Skip to content

Commit be37850

Browse files
authored
Merge pull request #513 from GetStream/change-client-side-file-extension-error-message
fix: Update client-side error message for mime type errors
2 parents fa2efe2 + e704a4e commit be37850

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

projects/stream-chat-angular/src/assets/i18n/en.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export const en = {
2727
'Error uploading file, maximum file size exceeded':
2828
'Error uploading "{{ name }}", maximum file size {{ limit }} exceeded',
2929
'Error uploading file, extension not supported':
30-
'Error uploading "{{ name }}", extension {{ ext }} not supported',
30+
'Error uploading "{{ name }}", type {{ ext }} not supported',
3131
'Error deleting attachment': 'Error deleting attachment',
3232
'Error · Unsent': "Message couldn't be sent",
3333
'Error: {{ errorMessage }}': 'Error: {{ errorMessage }}',
@@ -98,7 +98,6 @@ export const en = {
9898
"You can't send messages in this channel",
9999
"You can't send thread replies in this channel":
100100
"You can't send thread replies in this channel",
101-
'Unsupported file type: {{type}}': 'Unsupported file type: {{type}}',
102101
'Message not found': 'Message not found',
103102
'No chats here yet…': 'No chats here yet…',
104103
'user is typing': '{{ user }} is typing',

projects/stream-chat-angular/src/lib/message-input/message-input.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -547,10 +547,10 @@ export class MessageInputComponent
547547
hasNotAllowedMimeType
548548
) {
549549
this.notificationService.addTemporaryNotification(
550-
'streamChat.Unsupported file type: {{type}}',
550+
'streamChat.Error uploading file, extension not supported',
551551
undefined,
552552
undefined,
553-
{ type: f.type }
553+
{ name: f.name, ext: f.type }
554554
);
555555
isValid = false;
556556
}

0 commit comments

Comments
 (0)