kbaseapps / DataFileUtil

MIT License
0 stars 12 forks source link

Handle inaccessible Google Drive files sensibly #96

Open MrCreosote opened 7 months ago

MrCreosote commented 7 months ago

Currently, if a google drive file is not publicly available, the request gets forwarded to a request access page with a 200 status code. This tricks the download code into thinking things are ok, and the code saves a file (at least currently) called uc with the contents of the page, which hopefully will cause any remaining steps to fail based on the file format. If not things could get messy.

Hopefully this doesn't happen too often, as most people will get the link from google drive directly, which means they have access.

The google download code should be replaced to avoid using direct links if possible, since Google thinks they're coming from a browser.

Investigate the google drive python library.