Skip to content

Commit

Permalink
Fix new files returning Not Found message on VT
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelTulach committed Jul 8, 2021
1 parent d1ef7fc commit 61ed57a
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions uploader/uploader/UploadForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,19 @@ private void Upload()

try
{
var scanLink = scanJson.permalink.ToString();
string scanLink = scanJson.permalink.ToString();

// An example link can look like this:
// https://www.virustotal.com/gui/file/<filehash_or_resource_id>/detection/<scanid>
// If we don't remove the the scanid, then it will fail on new files since the scan did not finish
// Removing it like this will show the analysis progress for new files
scanLink = scanLink.Remove(scanLink.IndexOf("/detection"));

Process.Start(scanLink);

if (_settings.DirectUpload) CloseWindow();
}
catch (RuntimeBinderException)
catch (Exception)
{
// Response does not contain permalink so it failed
ChangeStatus(LocalizationHelper.Base.Message_NoLink);
Expand Down

1 comment on commit 61ed57a

@zekaka
Copy link

@zekaka zekaka commented on 61ed57a Jul 8, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New release works great now with unknown files! You are the king :-) Thx a lot ...

Please sign in to comment.