Skip to content

Commit

Permalink
Use proper size for 10MB
Browse files Browse the repository at this point in the history
  • Loading branch information
drewbitt committed Nov 15, 2019
1 parent db5e319 commit 134b836
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export function searchAnime(files) {

// Confirm size less than 10MB after converting to base64
const buffer = Buffer.from(based.substring(based.indexOf(",") + 1));
const bufferSize = Math.floor(buffer.length / 1024 ** (2 ** 2));
const bufferSize = Math.floor((buffer.length / 1024 ** 2) * 10);
if (!bufferSize < 1) {
return Promise.reject(
new Error("You should ensure your Base64 encoded image is < 10MB")
Expand Down

0 comments on commit 134b836

Please sign in to comment.