Skip to content
Commits on Source (2)
......@@ -404,8 +404,9 @@ export class AttachmentService {
private checkFileType(file): Promise<any> {
return new Promise((resolve, reject) => {
if (file.type && file.type.indexOf('video/') === 0) {
if (file.size > window.Minds.max_video_file_size) {
throw new Error('File exceeds 1.9GB maximum size. Please try compressing your file.');
const maxFileSize = window.Minds.max_video_file_size;
if (file.size > maxFileSize) {
throw new Error(`File exceeds ${maxFileSize / Math.pow(1000, 3)}GB maximum size. Please try compressing your file.`);
}
this.attachment.mime = 'video';
......