LCOV - code coverage report
Current view: top level - src/platform/workflow/sharing/utils - validateFileSize.ts Coverage Total Hit
Test: ComfyUI E2E Coverage Lines: 0.0 % 5 0
Test Date: 2026-11-17 04:17:53

            Line data    Source code
       1              : import { t } from '@/i18n'
       2              : import { useToast } from '@/components/ui/toast/toastStore'
       3              : 
       4              : export const MAX_IMAGE_SIZE_MB = 10
       5              : export const MAX_VIDEO_SIZE_MB = 50
       6              : 
       7            0 : export function isFileTooLarge(file: File, maxSizeMB: number): boolean {
       8            0 :   const fileSizeMB = file.size / 1024 / 1024
       9            0 :   if (fileSizeMB <= maxSizeMB) return false
      10              : 
      11            0 :   useToast().error(t('g.error'), {
      12              :     description: t('toastMessages.fileTooLarge', {
      13              :       size: fileSizeMB.toFixed(1),
      14              :       maxSize: maxSizeMB
      15              :     })
      16              :   })
      17            0 :   return true
      18              : }
        

Generated by: LCOV version 2.0-1