Skip to content

Commit

Permalink
js !=== python
Browse files Browse the repository at this point in the history
  • Loading branch information
dale-wahl committed Jun 25, 2024
1 parent f34b054 commit 8225871
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion webtool/static/js/fourcat.js
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,8 @@ const query = {
let snippet_size = 128 * 1024; // 128K ought to be enough for everybody
for (let pair of formdata.entries()) {
if (pair[1] instanceof File) {
if (!pair[1].type in ['application/zip', 'application/x-zip-compressed']) {
console.log(pair[1].type)
if (!['application/zip', 'application/x-zip-compressed'].includes(pair[1].type)) {
const sample_size = Math.min(pair[1].size, snippet_size);
const blob = pair[1].slice(0, sample_size); // do not load whole file into memory

Expand Down

0 comments on commit 8225871

Please sign in to comment.