(files)
| 120 | }, |
| 121 | |
| 122 | isTransferableBundle(files) { |
| 123 | if (files.length === 1 && files[0] instanceof window.File) return true; |
| 124 | |
| 125 | const fileSizeLimit = 50 * 1024 * 1024; |
| 126 | const bundleSizeLimit = 200 * 1024 * 1024; |
| 127 | let aggregatedSize = 0; |
| 128 | // eslint-disable-next-line no-restricted-syntax |
| 129 | for (const file of files) { |
| 130 | if (!(file instanceof window.File)) { |
| 131 | return false; |
| 132 | } |
| 133 | if (file.size > fileSizeLimit) { |
| 134 | return false; |
| 135 | } |
| 136 | aggregatedSize += file.size; |
| 137 | if (aggregatedSize > bundleSizeLimit) { |
| 138 | return false; |
| 139 | } |
| 140 | } |
| 141 | return true; |
| 142 | }, |
| 143 | }); |
nothing calls this directly
no outgoing calls
no test coverage detected