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
Copy file name to clipboardExpand all lines: README.md
+20-6Lines changed: 20 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,9 +22,9 @@ Include the components in your code:
22
22
The library includes 3 Components:
23
23
*[IKContext](#IKContext)
24
24
25
-
*[IKImage](#IKImage)
25
+
*[IKImage - URL generation](#IKImage)
26
26
27
-
*[IKUpload](#file-upload)
27
+
*[IKUpload - File upload](#file-upload)
28
28
29
29
### IKContext
30
30
@@ -45,7 +45,7 @@ In order to use the SDK, you need to provide it with a few configuration paramet
45
45
46
46
_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_
47
47
48
-
### IKImage
48
+
### IKImage - URL generation
49
49
50
50
The IKImage component component defines an ImageKit Image tag. example usage:
51
51
@@ -163,7 +163,7 @@ The SDK supports automatic support for LQIP for your images, if you set lqip to
163
163
##### How does the lqip work?
164
164
The component tries to keep it simple. It loads a lower quality image using the quality parameter to load a lower quality image, which is then replaced with the actual quality image later.
165
165
166
-
####File Upload
166
+
###IKUpload - File Upload
167
167
The SDK provides a simple Component to upload files to the ImageKit Media Library. It accepts `fileName` parameter as a prop. The file parameter is provided as an input from the user.
168
168
169
169
Also, make sure that you have specified `authenticationEndpoint` during SDK initialization. The SDK makes an HTTP GET request to this endpoint and expects a JSON response with three fields i.e. `signature`, `token` and `expire`.
@@ -184,7 +184,7 @@ Sample Usage
184
184
185
185
`IKUpload` component accepts all the parameters supported by the [ImageKit Upload API](https://docs.imagekit.io/api-reference/upload-file-api/client-side-file-upload#request-structure-multipart-form-data) as props e.g. `tags`, `useUniqueFileName`, `folder` etc.
186
186
187
-
We also equip the user with two props `onSuccess` and `onError` to handle success and failure, respectively. You can pass your custom functions to handle the response as you require it to be,
187
+
You can use `onSuccess` and `onError`callbacks to handle success and failure, respectively. You can pass your custom functions to handle the response from API.
The fastest way to get started is by running the demo application. You can run the code locally. The source code is in samples/sample-app. For the instructions in [readme.md](https://github.com/imagekit-developer/imagekit-react/blob/test-case/samples/sample-app/README.md) file within [samples/sample-app](https://github.com/imagekit-developer/imagekit-react/tree/test-case/samples/sample-app) folder.
207
209
208
-
####Error Handling
210
+
## Error Handling
209
211
We are using Error Boundaries to handle errors in the UI. `ErrorBoundary` is used to handle errors anywhere in their child component tree, log those errors, and display a fallback UI instead of the component tree that crashed. example:
210
212
211
213
```js
@@ -216,3 +218,15 @@ We are using Error Boundaries to handle errors in the UI. `ErrorBoundary` is use
216
218
}]} />
217
219
</ErrorBoundary>
218
220
```
221
+
222
+
## Support
223
+
224
+
For any feedback or to report any issues or general implementation support please reach out to [[email protected]](mailto:[email protected])
0 commit comments