# UploadcareConfig

interface

The configuration of the [Uploadcare feature](module_uploadcare_uploadcare-Uploadcare.md).

The minimal configuration for the Uploadcare feature requires providing the [`config.uploadcare.pubkey`](#member-pubkey):

```typescript
ClassicEditor
 .create( {
	 uploadcare: {
		 pubkey: 'YOUR_PUBLIC_KEY'
	 }
 } )
 .then( ... )
 .catch( ... );
```

However, you can also adjust the feature to fit your needs:

```typescript
ClassicEditor
 .create( {
	 uploadcare: {
	 	uploader: {
		 	sourceList: [
			 	'local',
			 	'url',
			 	'gdrive'
		 	],
		 },
		 pubkey: 'YOUR_PUBLIC_KEY'
	 }
 } )
 .then( ... )
 .catch( ... );
```

See [all editor options](module_core_editor_editorconfig-EditorConfig.md).

<a id="properties">

## Properties

<a id="member-allowExternalImagesEditing">

### `allowExternalImagesEditing?: ArrayOrItem<RegExp | 'origin' | ( src: string ) => boolean>`

Allows editing images that are not hosted in Uploadcare service.

This configuration option should whitelist URL(s) of images that should be editable.

The image is editable if this option is:

* a regular expression and it matches the image URL, or
* a custom function that returns `true` for the image URL, or
* `'origin'` literal and the image URL is from the same origin, or
* an array of the above and the image URL matches one of the array elements.

Images hosted in Uploadcare are always editable.

Defaults to `[]`

<a id="member-editor">

### `editor?: UploadcareEditorConfig`

Configuration for the Image Editor component. The component allows editing existing images in the CKEditor.

You can find detailed information in the [Uploadcare documentation](https://uploadcare.com/docs/file-uploader/image-editor/#configuration).

Please note that the `cdn-url` and `uuid` attributes are automatically handled by the Uploadcare plugin and are not supported in the config options.

<a id="member-locale">

### `locale?: object | UploadcareLocaleDefinitionResolver`

Locale configuration for Uploadcare components.

The plugin automatically uses the editor's language (`editor.locale.contentLanguage`) as the locale name. If the editor language is different from 'en', you need to provide translations for that language. This property is used only to supply translations that will be used by Uploadcare components.

For information on how to configure the editor's language, see the [CKEditor 5 localization documentation](../framework/deep-dive/ui/localization.md).

Example with `UploadcareLocaleDefinition`:

```typescript
uploadcare: {
	pubkey: 'YOUR_PUBLIC_KEY',
	locale: {
		'locale-id': 'de',
		'social-source-lang': 'de',
		'upload-file': 'Datei hochladen',
		'file__one': 'Datei',
		'file__other': 'Dateien',
		'header-uploading': 'Lade {{count}} {{plural:file(count)}} hoch'
	}
}
```

Example with `UploadcareLocaleDefinitionResolver` (for CDN loading):

```typescript
uploadcare: {
	pubkey: 'YOUR_PUBLIC_KEY',
	locale: () => import('https://cdn.jsdelivr.net/npm/@uploadcare/file-uploader@v1/locales/file-uploader/de.js')
		.then( module => module.default )
}
```

For detailed information about locale definition format, available languages, and CDN translations, see the [Uploadcare localization documentation](https://uploadcare.com/docs/file-uploader/localization/).

When translations are provided, they will be automatically applied to the Uploadcare components using `UC.defineLocale()` with the editor's language as the locale name.

Defaults to `undefined`

<a id="member-pubkey">

### `pubkey: string`

The public key used for communication with the Uploadcare services.

It will be used by both the File Uploader and Image Editor components.

<a id="member-uploader">

### `uploader?: UploadcareUploaderConfig`

Configuration that will be passed to the File Uploader component.

You can find detailed information in the [Uploadcare documentation](https://uploadcare.com/docs/file-uploader/options/).

Please note that the source list is limited to the following values:

* 'local'
* 'url'
* 'dropbox'
* 'gdrive'
* 'facebook'
* 'gphotos'
* 'onedrive'

Additionally, below options are not supported:

* `imgOnly` - It's `true` by default.
* `removeCopyright` - It's `true` by default.
* `localeName` - Custom translations can be provided via the `locale` config option.
* `confirmUpload` - It's `false` by default.
* `cameraMirror` - The `camera` source is not supported.
* `cameraCapture` - The `camera` source is not supported.
* `showEmptyList` - It's `false` by default.

All other options documented in the Uploadcare documentation are supported.

---

Full index of the CKEditor 5 API reference: [llms.txt](llms.txt)
