diff --git a/docs/content/2.components/CldUploadWidget.md b/docs/content/2.components/CldUploadWidget.md
index 6ba8324..08583c8 100644
--- a/docs/content/2.components/CldUploadWidget.md
+++ b/docs/content/2.components/CldUploadWidget.md
@@ -1,5 +1,5 @@
---
-description:
+description:
---
The CldUploadWidget creates a new instance of the [Cloudinary Upload Widget](https://cloudinary.com/documentation/upload_widget) giving you an easy way to add upload capabilities to your Nuxt app.
@@ -68,12 +68,13 @@ To use the above, create a Node-based API route, add the snippet, and use that e
## General Props
-| Prop Name | Type | Example |
-| ----------------- | -------- | ---------------------------------- |
-| children | function | `{ (options) => {} }` |
-| options | object | `{ encryption: {...} }` |
-| signatureEndpoint | string | `"/api/sign-cloudinary-params.js"` |
-| uploadPreset | string | `"my-upload-preset"` |
+| Prop Name | Type | Example |
+| ----------------- | ------ | ---------------------------------- |
+| options | object | `{ encryption: {...} }` |
+| signatureEndpoint | string | `"/api/sign-cloudinary-params.js"` |
+| uploadPreset | string | `"my-upload-preset"` |
+| config | object | `{ cloud: {}, url: {} }` |
+| tags | array | `['music', 'sad']` |
## Event Props
diff --git a/playground/app.vue b/playground/app.vue
index cbd279b..7db0d69 100644
--- a/playground/app.vue
+++ b/playground/app.vue
@@ -1,40 +1,38 @@
-
+
-
+
-
+
Upload
diff --git a/src/runtime/components/CldUploadWidget.vue b/src/runtime/components/CldUploadWidget.vue
index 7755253..5b97ad9 100644
--- a/src/runtime/components/CldUploadWidget.vue
+++ b/src/runtime/components/CldUploadWidget.vue
@@ -41,6 +41,7 @@ export interface CldUploadWidgetProps {
signatureEndpoint?: URL | RequestInfo
uploadPreset?: string
config?: ConfigOptions
+ tags?: Array
}
// Parameters sourced from:
@@ -250,6 +251,14 @@ if (signed) {
}
}
+if (props.tags?.length) {
+ uploadOptions.showAdvancedOptions = true
+
+ // eslint-disable-next-line @typescript-eslint/ban-types
+ uploadOptions.getTags = (cb: Function, prefix: string) =>
+ cb(prefix ? props.tags?.filter(t => !t.indexOf(prefix)) : props.tags)
+}
+
// Handle result states and callbacks
watch(results, () => {