UploadFile
Adds a new file to Drive from a local or remote source, with support for specifying Multipurpose Internet Mail Extensions (MIME) type and folder location.
Input
| Name | Type | Description |
| Id | String | The unique identifier for the file. Required only if you are updating an existing document rather than uploading a new one. |
| Name | String | The title of the file being uploaded, including its extension (for example, report.pdf). |
| Description | String | A brief user-defined summary describing the purpose or content of the uploaded file. |
| Starred | Boolean | If the value is 'true', the uploaded file will be marked as starred in Google Drive.
The default value is FALSE. |
| Trashed | Boolean | If the value is 'true', the file will be uploaded directly to the trash.
The default value is FALSE. |
| Viewed | Boolean | If the value is 'true', the uploaded file will be marked as viewed by the authenticated user.
The default value is FALSE. |
| MIMEType | String | The MIME type of the file. If not provided, it will be detected automatically based on the file content or extension. |
| ParentIds | String | A comma-separated list of folder IDs, such as abc123, def456, ghi789, that will act as parent folders for the uploaded file. |
| LocalFile | String | The full path, including the file name, of the local file to be uploaded. This is required if FileData is not specified. |
| FileData | String | The file's content in encoded form. Used as an alternative to LocalFile. The encoding type must match the Encoding parameter. |
| Encoding | String | Specifies the encoding format of the FileData input, such as base64.
The allowed values are NONE, BASE64. The default value is BASE64. |
| CopyRequiresWriterPermission | Boolean | If the value is 'true', users with viewer or commenter roles will be prevented from copying, printing, or downloading the file.
The default value is FALSE. |
Result Set Columns
| Name | Type | Description |
| Id | String | The unique identifier assigned to the uploaded or updated file in Google Drive. |
| Success | String | If the value is 'true', the file upload or update was completed successfully. If 'false', an error occurred. |