ducks/composer: Properly compare attachment size against limit
This commit is contained in:
parent
74abe0c1ef
commit
aa1f96cb6a
1 changed files with 2 additions and 2 deletions
|
@ -50,7 +50,7 @@ import {
|
|||
resetLinkPreview,
|
||||
suspendLinkPreviews,
|
||||
} from '../../services/LinkPreview';
|
||||
import { getMaximumAttachmentSizeInKb } from '../../util/attachments';
|
||||
import { getMaximumAttachmentSizeInKb, KIBIBYTE } from '../../util/attachments';
|
||||
import { getRecipientsByConversation } from '../../util/getRecipientsByConversation';
|
||||
import {
|
||||
getRenderDetailsForLimit,
|
||||
|
@ -901,7 +901,7 @@ function preProcessAttachment(
|
|||
}
|
||||
|
||||
const limitKb = getMaximumAttachmentSizeInKb();
|
||||
if (file.size > limitKb) {
|
||||
if (file.size / KIBIBYTE > limitKb) {
|
||||
return {
|
||||
toastType: ToastType.FileSize,
|
||||
parameters: getRenderDetailsForLimit(limitKb),
|
||||
|
|
Loading…
Reference in a new issue