petsc-3.11.4 2019-09-28
Report Typos and Errors

PetscGoogleDriveUpload

Loads a file to the Google Drive

Synopsis

PetscErrorCode PetscGoogleDriveUpload(MPI_Comm comm,const char access_token[],const char filename[])
Not collective, only the first process in the MPI_Comm uploads the file

Input Parameters

comm - MPI communicator
access_token - obtained with PetscGoogleDriveRefresh(), pass NULL to have PETSc generate one
filename - file to upload; if you upload multiple times it will have different names each time on Google Drive

Options Database

-google_refresh_token XXX - Usage Patterns: With PETSc option -google_refresh_token XXX given PetscGoogleDriveUpload(comm,NULL,filename); will upload file with no user interaction

Without PETSc option -google_refresh_token XXX given PetscGoogleDriveUpload(comm,NULL,filename); for first use will prompt user to authorize access to Google Drive with their browser

With PETSc option -google_refresh_token XXX given PetscGoogleDriveRefresh(comm,NULL,access_token,sizeof(access_token)); PetscGoogleDriveUpload(comm,access_token,filename);

With refresh token entered in some way by the user PetscGoogleDriveRefresh(comm,refresh_token,access_token,sizeof(access_token)); PetscGoogleDriveUpload(comm,access_token,filename);

PetscGoogleDriveAuthorize(comm,access_token,refresh_token,sizeof(access_token)); PetscGoogleDriveUpload(comm,access_token,filename);

See Also

PetscURLShorten(), PetscGoogleDriveAuthorize(), PetscGoogleDriveRefresh()

Level

intermediate

Location

src/sys/webclient/google.c

Examples

src/sys/webclient/examples/tutorials/googledriveupload.c.html

Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages