Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Commits on Source (2)
Updating text with filesize
· e792c991
Ben Hayward
authored
Jul 12, 2019
e792c991
Spacing
· b7e58cbe
Ben Hayward
authored
Jul 12, 2019
b7e58cbe
Hide whitespace changes
Inline
Side-by-side
src/app/services/attachment.ts
View file @
b7e58cbe
...
...
@@ -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
'
;
...
...