check if file exists

This commit is contained in:
Samuel Tulach 2020-06-26 20:00:49 +02:00
parent 4a060ce5d6
commit baee3211d7
1 changed files with 6 additions and 1 deletions

View File

@ -4,6 +4,7 @@ using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;
@ -78,7 +79,11 @@ namespace uploader
ChangeStatus(LocalizationHelper.Base.Message_Init);
_client = new RestClient("https://www.virustotal.com");
// TODO: check if file exists
if (!File.Exists(_fileName))
{
throw new FileNotFoundException();
}
ChangeStatus(LocalizationHelper.Base.Message_Check);
var reportRequest = new RestRequest("vtapi/v2/file/report", Method.POST);