jobin
jobin

Reputation: 2798

How to check if user's Google Drive has enough space using Drive SDK?

I am trying to upload a file to Google Drive using Drive SDK.

I wanted to know if there is an API method to check if the user's drive has enough capacity to hold the file. If yes, can you please point me to where I should search, if not what is the best way to handle this?

P.S.: Please assume that I know the size of the file to upload.

Upvotes: 2

Views: 1172

Answers (1)

JunYoung Gwak
JunYoung Gwak

Reputation: 2987

About.get() will tell you user's quota and usage. You can calculate user's free space based on this information.

Upvotes: 7

Related Questions