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
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,7 @@ var imagekit = new ImageKit({
41
41
## Usage
42
42
You can use this NodeJS SDK for 3 different kinds of functions - URL generation, file uploads and file management. The usage of the SDK has been explained below
43
43
44
-
###URL Generation
44
+
## URL Generation
45
45
46
46
**1. Using image path and image hostname or endpoint**
47
47
@@ -209,7 +209,7 @@ The complete list of transformations supported and their usage in ImageKit can b
209
209
210
210
211
211
212
-
###File Upload
212
+
## File Upload
213
213
214
214
The SDK provides a simple interface using the `.upload()` method to upload files to the ImageKit Media Library. It accepts all the parameters supported by the [ImageKit Upload API](https://docs.imagekit.io/imagekit-docs/server-side-file-upload).
215
215
@@ -230,7 +230,7 @@ If the upload fails, `error` will be the same as what is received from ImageKit'
230
230
231
231
232
232
233
-
###File Management
233
+
## File Management
234
234
235
235
The SDK provides a simple interface for all the [media APIs mentioned here](https://docs.imagekit.io/imagekit-docs/media-api) to manage your files. You can use a callback function with all API interfaces. The first argument of the callback function is the error and the second is the result of the API call. Error will be `null` if the API succeeds.
We have included following commonly used utility functions in the package.
315
+
We have included following commonly used utility functions in this package.
316
316
317
-
### Authentication Parameter Generation
317
+
### Authentication parameter generation
318
318
319
319
In case you are looking to implement client-side file upload, you are going to need a token, expiry timestamp and a valid signature for that upload. The SDK provides a simple method that you can use in your code to generate these authentication parameters for you.
320
320
@@ -335,11 +335,11 @@ Returns
335
335
336
336
Both the `token` and `expire` parameters are optional. If not specified the SDK uses the [uuid](https://www.npmjs.com/package/uuid) package to generate a random token and also generates a valid expiry timestamp internally. The value of the `token` and `expire` used to generate the signature are always returned in the response, no matter if they are provided as an input to this method or not.
337
337
338
-
### Distance calculation for two pHashes
338
+
### Distance calculation between two pHashe values
339
339
340
-
Perceptual hashing allows you to constructing a hash value that uniquely identifies an input image based on the contents of an image.
340
+
Perceptual hashing allows you to constructing a hash value that uniquely identifies an input image based on the contents of an image.[ImageKit.io metadata API](https://docs.imagekit.io/imagekit-docs/metadata-api) returns the pHash value of an image in the response. You can use this value to find a duplicate (or similar) image by calculating distance between pHash value of two images.
341
341
342
-
Calculate the distance between pHash strings of two images. Accepts two pHash hexadecimal strings and returns a numeric value indicative of the level of difference between the two images.
342
+
This SDK exposes `pHashDistance` function to calcualte distance between two pHash values. It accepts two pHash hexadecimal strings and returns a numeric value indicative of the level of difference between the two images.
0 commit comments