Open dd-han opened 7 years ago
you can download this file from browser?
@szunyi Yes, I can force the download after confirming the warning on the browser.
But here I can't.
Is there a solution for this? Because I have the same problem.
@Bomel no, I manually download file to my computer by web browser
then upload to headless machine by ssh
FYI: There's a parameter, acknowledgeAbuse=true
, that can be passed to bypass this warning. The API docs ask that software explicitly get permission from the user before passing it, and passing it for a non-blocked file is an error.
User can be prompted to acknowledge abusive file to forcefully download
User can be prompted to acknowledge abusive file to forcefully download
How? in terminal?
How to fix it in code? can anyone tell me
@dkb007 I switch to Rclone for my purpose
User can be prompted to acknowledge abusive file to forcefully download
How? in terminal?
Did you find out?
Все решается просто.
В файле /gdrive/drive/download.go
находим:
res, err := self.service.Files.Get(f.Id).SupportsTeamDrives(true).Context(ctx).Download()
заменяем на:
res, err := self.service.Files.Get(f.Id).AcknowledgeAbuse(true).SupportsTeamDrives(true).Context(ctx).Download()
Как компилировать - смотрим тут - https://github.com/prasmussen/gdrive/issues/392#issuecomment-472186479
PS: использовать отдельно. Т.е. для нормальных файлов - обычную версию gdrive. Для плохих файлов - gdrive измененный. С другим именем например, в варианте с PHP: $str = 'gdrive download --no-progress --path /home/temp/ ' . $drive_id; $out = shell_exec($str); if ( strpos($out, 'This file has been identified as malware or spam and cannot be downloaded') !== false ) { $str = 'gdrivesu download --no-progress --path /home/temp/ ' . $drive_id; $out = shell_exec($str); }
console show:
anyway to bypass this file or force download file ?