How to get the file URL uploaded in google drive SDK using php -


i using google drive sdk upload files php. want link string can store in database. don't have idea on how it.. code in creating file in google drive using php.

$file = new google_drivefile(); $file->settitle( 'new_pdf' ); $file->setmimetype( 'application/pdf' ); $createdfile = $service->files->insert( $file, array(     'data' => $stringcontent, )); 

you want 1 of properties of $createdfile.

the list of properties @ https://developers.google.com/drive/v2/reference/files

you want webcontentlink, depends on how intend use url.


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -

Why does a .NET 4.0 program produce a system.unauthorizedAccess error on a Windows Server 2012 machine with .NET 4.5 installed? -