I'm trying to upload a 36MB zip file to Virus Total using their public API in NodeJS using request. I'm currently coming across this issue when trying to upload and can't figure out what to do next to fix it. Their API doesn't state any file size limit, and their frontend uploader specifies a 128MB upload limit.
<html><head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>413 Request Entity Too Large</title>
</head>
<body text=#000000 bgcolor=#ffffff>
<h1>Error: Request Entity Too Large</h1>
<h2>Your client issued a request that was too large.
</h2>
<h2></h2>
</body></html>
Code is straight forward and simple, but really don't know what to do to fix it. Any help is appreciated.
var request = require('request');
var fs = require('fs');
var formData = {
file: fs.createReadStream('./path/to/file.zip'),
apikey: 'public-vt-apikey'
};
var options = {
url: 'https://www.virustotal.com/vtapi/v2/file/scan',
formData: formData
};
request.post(options, function(err, res, body) {
console.log(body);
});
The VirusTotal file/scan API call is limited to 32MB. If you have a good use case for scanning large files you can ask VirusTotal for access to another API call for larger files which can can files up to 200MB.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With