mtojek / gdriver Goto Github PK
View Code? Open in Web Editor NEWDownload an upload large files to Google Drive (API v3)
License: Apache License 2.0
Download an upload large files to Google Drive (API v3)
License: Apache License 2.0
Hi mtojek,
I'm building something with the Google Drive API and wanted to see the idiomatic way to download a file, when I stumbled upon this project.
If I'm not mistaken, then you forgot to close the resp.Body in downloadFileData(), which leds to a resource leak. More specificially, the connection isn't reused and thus the file descriptor isn't freed.
If the returned error is nil, the Response will contain a non-nil Body which the user is expected to close. If the Body is not both read to EOF and closed, the Client's underlying RoundTripper (typically Transport) may not be able to re-use a persistent TCP connection to the server for a subsequent "keep-alive" request. more
To fix this, add defer resp.Body.Close()
after you check the error of ...Download()
.
Have a nice day! :)
Hello i really liked your server but i want to download some shared folder files but the thing is i cannot access the Anyone link. The files are restricted to specific users. Even if i have auth from the same id i cannot download them using your gdriver program what can i do please tell me. it gives this error
Read folder metadata for "17bOYXU3lpoDlg-yYgDPea_frqWbAEY6g"
Error: downloading files failed: can't read folder metadata (ID: 17bOYXU3lpoDlg-yYgDPea_frqWbAEY6g): googleapi: Error 404: File not found: 17bOYXU3lpoDlg-yYgDPea_frqWbAEY6g., notFound
I have a 145TB Google Drive account with lots of videos which is accessed frequently and always maxes out daily bandwidth.
Using this utility, through the Drive API, will I have any limits regarding quotas per day and the amount of downloads I can do? The fact that the Google Drive account, web version, runs out of bandwidth for a while, will not affect the use of this tool?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.