Scan a Google Cloud Platform (GCP) Storage File for Viruses in C#

Modern-day technology is advancing at a very swift pace, but while our technology is evolving, so are the viruses that threaten its use. When you’re storing sensitive data within a GCP storage file, you should also be sure to check that data for any threats. The following API will efficiently scan your file for threats, employing continuous cloud-based updates to ensure the most current virus signatures are scanned for detection.

Image for post
Image for post

Let’s get started! First, you need to install the SDK — for this example, we are using .NET Framework, but .NET Core is available as well.

Install-Package Cloudmersive.APIClient.NET.VirusScan -Version 3.0.3

Then, we call the function with the following code:

using System;
using System.Diagnostics;
using Cloudmersive.APIClient.NET.VirusScan.Api;
using Cloudmersive.APIClient.NET.VirusScan.Client;
using Cloudmersive.APIClient.NET.VirusScan.Model;

Once complete, you will receive a response giving you the virus name (if detected) or giving you the green light that your file is virus-free.

Written by

There’s an API for that. Cloudmersive is a leader in Highly Scalable Cloud APIs.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store