Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

1.8K
Visualizações
Download the file from Google.Drive via WebClient C#

Me need to download the file at: https://drive.google.com/u/0/uc?id=1sSR9kWifwjIP5qFWcyxGCxN0-MoEd_oo&export=download

But after downloading the file, I get just a document with a single line: "Google Drive-Virus scan warning". In theory, I should download the file from the link specified in the url (I got it through the browser console), but instead I download an incomprehensible document with one line. As far as I understand, I download the page markup, but not the file itself. How can this be fixed ?

To download a file, use the following method:

using System;
using System.Net;


public class Program
{

    public static void Main(string[] args)
    {
        {
            string url = "https://drive.google.com/u/0/uc?export=download&confirm=pKfr&id=1sSR9kWifwjIP5qFWcyxGCxN0-MoEd_oo";
            string savePath = @"C:\Users\Saint\Desktop\TaskRetail\yml.xml";
            WebClient client = new WebClient();
            client.DownloadFile(url, savePath);
            Console.ReadLine();
        }
    }
over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Ref: https://bytesbin.com/skip-google-drive-virus-scan-warning-large-files/

Create Credentials:

enter image description here

An API key will be generated, copy the key and paste it somewhere as we will need it later.

enter image description here

Step 2. Tweak Shared URL

Look for the Google Drive file that you wish to download directly without any virus warning. Here copy the File ID and paste it somewhere safe

enter image description here

Open Chrome and Enter the following Google APIs URL.

https://www.googleapis.com/drive/v3/files/FileID?alt=media&key=APIKey

Enter the file id copied in the fileID section and the API Key in the APIKey section.

enter image description here

Hit Enter and the file will start downloading without any warning symbol.

enter image description here

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda