This commit is contained in:
leejinho 2020-02-14 10:04:45 +09:00
parent 2d6323274b
commit ff9f06d648
2 changed files with 5 additions and 3 deletions

View File

@ -232,15 +232,16 @@ export class CommonApiService {
const rejected: string[] = []; const rejected: string[] = [];
for (const file of files) { for (const file of files) {
const info = await MimeUtil.getMimeFromBlob(file); const info = await MimeUtil.getMimeFromBlob(file);
// console.log('mime info', info);
if ( if (
!file || !file ||
!info ||
-1 === -1 ===
this.moduleConfig.acceptableFileExtensions.indexOf( this.moduleConfig.acceptableFileExtensions.indexOf(
info.ext.toLocaleLowerCase() info.ext.toLocaleLowerCase()
) )
) { ) {
rejected.push(info.ext); rejected.push(file.name);
accept = false; accept = false;
} }
} }
@ -252,6 +253,7 @@ export class CommonApiService {
); );
} }
/** @deprecated */
public mimeCheckForImageAndVideoFiles(files: File[]) { public mimeCheckForImageAndVideoFiles(files: File[]) {
files.forEach(file => { files.forEach(file => {
console.log(file); console.log(file);

View File

@ -1145,7 +1145,7 @@ export class MessagesComponent implements OnInit, OnDestroy, AfterViewInit {
AlertSnackbarComponent, AlertSnackbarComponent,
AlertSnackbarData AlertSnackbarData
>(AlertSnackbarComponent, { >(AlertSnackbarComponent, {
duration: 1000, duration: 3000,
verticalPosition: 'bottom', verticalPosition: 'bottom',
horizontalPosition: 'center', horizontalPosition: 'center',
data: { data: {