> ## Documentation Index
> Fetch the complete documentation index at: https://veryfront.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Update external file

> Update external file.

`updateExternalFile(input: ExternalStorageUpdateInput!): ExternalStorageFile!`

Requires project.integrations.connect.

## Arguments

| Argument | Type | Required |
| - | - | - |
| `input` | [`ExternalStorageUpdateInput!`](https://veryfront.com/docs/cloud/graphql/types/externalstorageupdateinput) | Yes |

## Input fields

### input

[`ExternalStorageUpdateInput`](https://veryfront.com/docs/cloud/graphql/types/externalstorageupdateinput)

| Field | Type | Required | Description |
| - | - | - | - |
| `provider` | [`String!`](https://veryfront.com/docs/cloud/graphql/types/string) | Yes | Storage provider accessed through the caller's own personal connection. A human caller is required; agent, run, and service-account credentials are refused. |
| `projectReference` | [`String`](https://veryfront.com/docs/cloud/graphql/types/string) | No | Project ID or slug. Requires project.integrations.connect through the caller's own personal provider connection. |
| `fileId` | [`String!`](https://veryfront.com/docs/cloud/graphql/types/string) | Yes | |
| `content` | [`String!`](https://veryfront.com/docs/cloud/graphql/types/string) | Yes | |
| `contentEncoding` | [`ExternalFileContentEncoding`](https://veryfront.com/docs/cloud/graphql/types/externalfilecontentencoding) | No | Content encoding; base64 when omitted. |
| `ifMatch` | [`String`](https://veryfront.com/docs/cloud/graphql/types/string) | No | Refuse the write unless the file's etag still matches. |

## Response

Returns [`ExternalStorageFile!`](https://veryfront.com/docs/cloud/graphql/types/externalstoragefile). Open the type for its fields and nested types.

| Field | Type | Description |
| - | - | - |
| `id` | [`ID!`](https://veryfront.com/docs/cloud/graphql/types/id) | |
| `provider` | [`String!`](https://veryfront.com/docs/cloud/graphql/types/string) | Provider that stores the item: onedrive, sharepoint or drive. |
| `name` | [`String!`](https://veryfront.com/docs/cloud/graphql/types/string) | |
| `path` | [`String!`](https://veryfront.com/docs/cloud/graphql/types/string) | |
| `mimeType` | [`String!`](https://veryfront.com/docs/cloud/graphql/types/string) | |
| `sizeBytes` | [`Float!`](https://veryfront.com/docs/cloud/graphql/types/float) | |
| `kind` | [`String!`](https://veryfront.com/docs/cloud/graphql/types/string) | |
| `parentId` | [`String`](https://veryfront.com/docs/cloud/graphql/types/string) | Provider ID of the parent folder, or null. |

[All fields of `ExternalStorageFile`](https://veryfront.com/docs/cloud/graphql/types/externalstoragefile).

Types marked with `!` cannot be null. Lists use `[Type]` notation. The [type index](https://veryfront.com/docs/cloud/graphql/schema.md) lists all published input and response types.

## Example

```graphql title="query.graphql" theme={null}
mutation UpdateExternalFile($input: ExternalStorageUpdateInput!) {
  updateExternalFile(input: $input) {
    id
    name
    etag
    kind
    mimeType
  }
}
```

```json title="variables.json" theme={null}
{
  "input": {
    "provider": "drive",
    "projectReference": "example-project",
    "fileId": "00000000-0000-4000-8000-000000000001",
    "content": "aGVsbG8=",
    "contentEncoding": "base64"
  }
}
```

<details>
  <summary>Try this mutation</summary>

  Calls use `https://api.veryfront.com/graphql`. Replace sample values with resources you can access. See [Authentication](https://veryfront.com/docs/cloud/authentication.md) for credentials and permissions.

  Bearer token or API key

  Stored in this tab's session. Clear credential

  Mutation

  Variables (JSON)
</details>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.