php - How to automatically share file with a specific email address / user? -
i using google api client upload , convert file user's google drive. how can automatically share file 1 specific user?
$file = new google_service_drive_drivefile(); $file->title = $title; $chunksizebytes = 1 * 1024 * 1024; // call api media upload, defer doesn't return. $client->setdefer(true); $request = $service->files->insert($file, array( 'convert' => true, ));
the webapp html form creates document based on user data. document needs later edited myself, saved in google drive, , deleted user's google drive.
what best/easiest way achieve this?
to share file drive api use permissions.insert()
type "user", role of either "reader", "writer", or "commenter", , value email address. more information sharing files available in this developer guide.
Comments
Post a Comment