Commit d3e6e10d authored by Ben Hayward's avatar Ben Hayward

Checking filesize of attached video

1 merge request!438[Sprint/InterestingIguana](bug): Throwing exception when max filesize reached
Pipeline #70165536 passed with stages
in 28 minutes and 52 seconds
......@@ -404,8 +404,11 @@ export class AttachmentService {
private checkFileType(file): Promise<any> {
return new Promise((resolve, reject) => {
if (file.type && file.type.indexOf('video/') === 0) {
if (file.size > 1900000000) {
throw new Error('File exceeds 1.9GB maximum size. Please try compressing your file.');
}
this.attachment.mime = 'video';
this.checkVideoDuration(file).then(duration => {
if (window.Minds.user.plus) {
window.Minds.max_video_length = window.Minds.max_video_length * 2; // Hacky
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment