google-drive-ruby icon indicating copy to clipboard operation
google-drive-ruby copied to clipboard

How to download file infected with virus?

Open Inversion-des opened this issue 4 years ago • 0 comments

In my case, I had a problem with one file. There was an archive with an "eicar" file which is used for testing antivirus reaction. download_to_file method fails in such case with Invalid request (Google::Apis::ClientError). And it was hard to find a way to resolve this.

Solution is to call it with additional param file.download_to_file("/path/to/hoge.txt", acknowledge_abuse:true).

You can read about the acknowledgeAbuse param here.

Inversion-des avatar Aug 25 '21 11:08 Inversion-des