Reputation: 95
If FileID follows a particular format like new file has higher values or lower values I can keep track of the old values and find out whether I hace uploaded a new File in drive.
Upvotes: 6
Views: 4153
Reputation: 929
The format is a 264 bit number
bit 0 5 6 261 261 263
+--------+-----------------+-------+
| 110101 | 256 RANDOM BITS | 00 |
+--------+-----------------+-------+
url safe base64 encoded as
/1[a-zA-Z0-9_-]{42}[AEIMQUYcgkosw048]/
You can store just the random part as a Byte[32]
but it is safer to treat it as a random string as this may change at any time
Upvotes: 10
Reputation: 22306
File ID is just a random string - there is no format.
You are taking the wrong approach. Look at the changes resource https://developers.google.com/drive/v3/reference/changes
Upvotes: 0