# PetscBoxUpload
Loads a file to the Box Drive 
## Synopsis
```
PetscErrorCode PetscBoxUpload(MPI_Comm comm, const char access_token[], const char filename[])
```
This routine has not yet been written; it is just copied from Google Drive

Not collective, only the first process in the `MPI_Comm` uploads the file


## Input Parameters

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



## Options Database Key

- ***-box_refresh_token XXX -*** the token value



## Usage Patterns
```none
    With PETSc option -box_refresh_token XXX given
    PetscBoxUpload(comm,NULL,filename);        will upload file with no user interaction

    Without PETSc option -box_refresh_token XXX given
    PetscBoxUpload(comm,NULL,filename);        for first use will prompt user to authorize access to Box Drive with their processor

    With PETSc option -box_refresh_token  XXX given
    PetscBoxRefresh(comm,NULL,access_token,sizeof(access_token));
    PetscBoxUpload(comm,access_token,filename);

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

    PetscBoxAuthorize(comm,access_token,refresh_token,sizeof(access_token));
    PetscBoxUpload(comm,access_token,filename);
```





## See Also
 `PetscURLShorten()`, `PetscBoxAuthorize()`, `PetscBoxRefresh()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/webclient/box.c.html#PetscBoxUpload">src/sys/webclient/box.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/webclient/box.c)


[Index of all Sys routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
