iosgoogle-drive-api

Retrieve a "Google doc" created file size with the Google drive API for iOS


I'm trying to get the file size of the files saved in a Google Drive account using the Google Drive SDK for iOS.

There is no issue when the file in Google Drive is not created with Google Docs, but if the file is created with Google Doc I can't find the JSON key/value pair with the size: it does not look like the information is provided... .

If I'm wrong, would appreciate you can direct me where to find the file size of a Google Doc created file.


Solution

  • From the comments above and my reading of the Google SDK docs... Google Drive SDK API do not provide the size of a file created within google doc.

    Few reasons for that:

    1) Those file size do not count in calculating the space usage of your google drive 2) A google doc can be exported in different formats and each of them may have a different size, so asking for the file size of a google doc generated file is ambiguous until you export it.

    Thanks rmaddy and pinoyyid for your comments,

     dom