google-drive-ruby
google-drive-ruby copied to clipboard
How to download file infected with virus?
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.