bug fixed
This commit is contained in:
parent
55170ae702
commit
4debdf1ec9
|
@ -228,9 +228,18 @@ export class CommonApiService {
|
|||
): Promise<{ accept: boolean; rejected: string[] }> {
|
||||
return new Promise<{ accept: boolean; rejected: string[] }>(
|
||||
async (resolve, reject) => {
|
||||
const mediaFiles = this.mediaFiles(files);
|
||||
if (!mediaFiles) {
|
||||
resolve({
|
||||
accept: true,
|
||||
rejected: undefined
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
let accept = true;
|
||||
const rejected: string[] = [];
|
||||
for (const file of files) {
|
||||
for (const file of mediaFiles) {
|
||||
const info = await MimeUtil.getMimeFromBlob(file);
|
||||
// console.log('mime info', info);
|
||||
if (
|
||||
|
|
|
@ -1140,13 +1140,8 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
|
|||
return;
|
||||
}
|
||||
|
||||
const mediaFiles = this.commonApiService.mediaFiles(
|
||||
fileUploadItems.map(fui => fui.file)
|
||||
);
|
||||
|
||||
if (!!mediaFiles) {
|
||||
const fakeMedia = await this.commonApiService.checkInvalidMediaMimeForFileTalk(
|
||||
mediaFiles
|
||||
fileUploadItems.map(fui => fui.file)
|
||||
);
|
||||
if (!fakeMedia.accept) {
|
||||
if (!!this.fileUploadQueue) {
|
||||
|
@ -1175,7 +1170,6 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
|
|||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
for (const fileUploadItem of fileUploadItems) {
|
||||
let thumbnail: File;
|
||||
|
|
Loading…
Reference in New Issue
Block a user