googleapis / google-api-php-client

A PHP client library for accessing Google APIs
Apache License 2.0
9.2k stars 3.52k forks source link

documentation example of file resumable upload #2526

Closed momox-maxim closed 6 months ago

momox-maxim commented 7 months ago

Hi, could you please check if this example is outdated? It seems that it can not work

https://github.com/googleapis/google-api-php-client/blob/7a95ed29e4b6c6859d2d22300c5455a92e2622ad/examples/large-file-upload.php#L104

image

saranshdhingra commented 6 months ago

I just tried it and seems to me that it is working just fine. I don't know if the docbloc changed, I'll check and get back to you on that, but the code snippet is surely working fine.

saranshdhingra commented 6 months ago

Hi @momox-maxim I checked and the dobloc doesn't seem to be updated in a while and before we go further, I wanted to ask you did you use the $client->setDefer(true); part of the sample in your code.

I ask because I don't see that in the screenshot and using that line should mean that the files->create call should return an object that implements the RequestInterface meaning there won't be an issue with this.

saranshdhingra commented 6 months ago

Closing this issue for now.

Please feel free to reopen if more discussion on this is needed.

Thanks,