--- sidebar_position: 4 --- # Upload file Uploads a file to the drive `Function UploadFile(Val Token, Val File, Val Description) Export` | Parameter | CLI option | Type | Description | |-|-|-|-| | Token | --token | String | Token | | File | --file | BinaryData,String | File to be uploaded | | Description | --props | Map Of KeyAndValue | JSON description or path to .json | Returns: Map Of KeyAndValue - serialized JSON response from Google
```bsl title="Code example" Token = "ya29.a0AcM612wLdbBK14FR2SE0d3WHabYb8Xtppm0oKCcbVrecgsA-a5DfsgZ29stOw4hu84F_IpHbKTJocsm1WpjLQPBT5MJ6p8D7H1PKa_iT0..."; Image = "https://github.com/Bayselonarrend/OpenIntegrations/raw/main/service/test_data/picture.jpg"; Directory = "191iyaa6-2BCNRPOF0F8mQ0TuNWPNesdM"; Description = OPI_GoogleDrive.GetFileDescription(); Description.Insert("Parent", Directory); Result = OPI_GoogleDrive.UploadFile(Token, Image, Description); ``` ```sh title="CLI command example" oint gdrive UploadFile --token %token% --file %file% --props %props% ``` ```json title="Result" ```