I am creating an application to automatically start a file upload with a user. For example, it was directly for implementation for Dropbox links, as described here .
I’m trying to implement the same features for Google Drive links, but I’m having difficulty. Now the application takes the third part of the link (file identifier) and adds it to "https://docs.google.com/uc?export=download&id=". But this seems unreliable, especially since there are at least 3 different link formats for shared files that I found (https://drive.google.com/file/d/xyz, https://docs.google .com / document / d / xyz, etc.). Does anyone know of a generally applicable and reliable way to capture files from common sections of Google Drive, such as the one described above for Dropbox?
Finally, we have Oauth access to the Drive user account. For files shared with sharing settings set to 'Private' (or anything other than “Publish on the Internet” or “Anyone with a link”), I studied (with little success) if you can download these files on behalf of an authenticated Oauth user - does anyone have an idea about this?
Any ideas or suggestions would be greatly appreciated.
[Refresh] "private" shared files can be downloaded from the Drive user account - they are automatically added to the "Together with me" folder, so you just need a reliable way to capture the file ID.
python google-drive-sdk google-docs google-docs-api
Cian
source share