You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`urlEndpoint` is required to use the SDK. You can get URL-endpoint from your ImageKit dashboard - https://imagekit.io/dashboard#url-endpoints.
103
-
104
-
`publicKey` and `authenticator` parameters are required if you want to use the SDK for client-side file upload. You can get these parameters from the developer section in your ImageKit dashboard - https://imagekit.io/dashboard#developers.
105
-
106
-
`transformationPosition` is optional. The default value for this parameter is `path`. Acceptable values are `path` & `query`
107
-
108
-
_Note: Do not include your Private Key in any client-side code, including this SDK or its initialization. If you pass the `privateKey` parameter while initializing this SDK, it throws an error_
109
-
110
-
Or, import components individually.
111
-
```
112
-
import { IKImage, IKVideo, IKContext, IKUpload } from "imagekitio-vue"
113
100
114
101
exportdefault {
115
102
components: {
@@ -119,20 +106,18 @@ export default {
119
106
IKUpload
120
107
}
121
108
}
109
+
122
110
```
111
+
`urlEndpoint` is required to use the SDK. You can get URL-endpoint from your ImageKit dashboard - https://imagekit.io/dashboard#url-endpoints.
123
112
124
-
### Quick examples
125
-
```js
126
-
importImageKitfrom"imagekitio-vue"
127
-
import { createApp } from'vue';
113
+
`publicKey` and `authenticator` parameters are required if you want to use the SDK for client-side file upload. You can get these parameters from the developer section in your ImageKit dashboard - https://imagekit.io/dashboard#developers.
128
114
129
-
constapp=createApp({});
115
+
`transformationPosition` is optional. The default value for this parameter is `path`. Acceptable values are `path` & `query`
130
116
131
-
app.use(ImageKit, {
132
-
urlEndpoint:"your_url_endpoint", // Required. Default URL-endpoint is https://ik.imagekit.io/your_imagekit_id
133
-
publicKey:"your_public_api_key", // optional
134
-
})
117
+
_Note: Do not include your Private Key in any client-side code, including this SDK or its initialization. If you pass the `privateKey` parameter while initializing this SDK, it throws an error_
135
118
119
+
### Quick examples
120
+
```js
136
121
// Rendering image using a relative file path
137
122
<IKImage
138
123
path="/default-image.jpg"
@@ -193,12 +178,12 @@ app.use(ImageKit, {
193
178
// Render an image using an absolute URL - https://www1.custom-domain.com/default-image.jpg?tr=w-100
The `IKImage`component renders an `img` tag. It is used for rendering and manipulating images in real time. `IKImage` component accepts the following props:
@@ -494,6 +472,7 @@ See the complete list of transformations supported in ImageKit [here](https://do
494
472
| effectContrast | e-contrast |
495
473
| effectGray | e-grayscale |
496
474
| original | orig |
475
+
| raw | The string provided in raw will be added to the URL as it is. |
497
476
498
477
</details>
499
478
@@ -672,7 +651,10 @@ The SDK provides the `IKUpload` component to upload files to the [ImageKit Media
672
651
| overwriteCustomMetadata | Boolean | Optional. Default is true. If the request does not have customMetadata , overwriteCustomMetadata is set to true and a file already exists at the exact location, exiting customMetadata will be removed. In case the request body has customMetadata, setting overwriteCustomMetadata to false has no effect and request's customMetadata is set on the asset. |
673
652
| customMetadata | Object | Optional. JSON key-value data to be associated with the asset. |
674
653
| ref | Reference | Optional. Reference to the core HTMLInputElement.|
675
-
| onSuccess | Function callback | Optional. Called if the upload is successful. The first and only argument is the response JSON from the upload API |
654
+
| onUploadStart | Function callback | Optional. Called before the upload is started. The first and only argument is the HTML input's change event |
655
+
| onUploadProgress | Function callback | Optional. Called while an upload is in progress. The first and only argument is the ProgressEvent |
656
+
| validateFile | Function callback | Optional. Called before the upload is started to run custom validation. The first and only argument is the file selected for upload. If the callback returns `true`, the upload is allowed to continue. But, if it returns `false`, the upload is not done |
657
+
| onSuccess | Function callback | Optional. Called if the upload is successful. The first and only argument is the response JSON from the upload API. The request-id, response headers, and HTTP status code are also accessible using the $ResponseMetadata key that is exposed from the [javascript sdk](https://github.com/imagekit-developer/imagekit-javascript#access-request-id-other-response-headers-and-http-status-code)|
676
658
| onError | Function callback | Optional. Called if upload results in an error. The first and only argument is the error received from the upload API |
677
659
| urlEndpoint | String | Optional. If not specified, the URL-endpoint specified at the time of [SDK initialization](#initialization) is used. For example, https://ik.imagekit.io/your_imagekit_id/endpoint/|
678
660
| publicKey | String | Optional. If not specified, the `publicKey` specified at the time of [SDK initialization](#initialization) is used.|
0 commit comments