Skip to content

Commit 4cbb1bd

Browse files
committed
resolved comments
1 parent 561ddbf commit 4cbb1bd

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ If you want to generate transformations in your application and add them to the
356356
The SDK provides a simple interface using the `.upload()` method to upload files to the ImageKit Media library. It
357357
accepts an object of the `FileCreateRequest` class that contains all the parameters supported by the [ImageKit Upload API](https://docs.imagekit.io/api-reference/upload-file-api/server-side-file-upload).
358358

359-
The constructor `FileCreateRequest` class requires `file` as (URL/Base64/Byte Array) and `file_name`. If `file` is byte array then it's require another parameter named `mediaType` to upload a file. The method returns object of `Result` class. It contains method `isSuccessful()` (return boolean), `getMessage()` for error message and other file parameter responsed by server.
359+
The constructor `FileCreateRequest` class requires `file` as (URL/Base64/Byte Array) and `file_name`. The method returns object of `Result` in case of successful, or it will throw custom exception in case of failure.
360360

361361
Sample usage
362362

@@ -406,9 +406,9 @@ System.out.println("Map Response:");
406406
System.out.println(result.getResponseMetaData().getMap());
407407
```
408408

409-
If the upload is successful, `getMessage()` will be `None`, and the result will be an object of `Result` class that contains the same all the parameters received from ImageKit's servers, and `isSuccessful()` will return true.
409+
If the upload is successful, result will be there as an object of `Result` class that contains the same all the parameters received from ImageKit's servers.
410410

411-
If the upload fails, `getMessage()` will contain the same error message received from ImageKit's servers, and `isSuccessful()` will return false.
411+
If the upload fails, custom exception getting thrown and by doinf`getMessage()` will contain the same error message received from ImageKit's servers.
412412

413413

414414
## File Management

imagekit-sdk/src/test/java/io/imagekit/sdk/GetUrlTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ public void getUrl_with_transformation_parameters() {
199199

200200
String url = SUT.getUrl(options);
201201
assertThat(
202-
"https://ik.imagekit.io/your_imagekit_id/tr:cm-extract,ofo-top,n-any_name,md-true,ow-20,e-contrast-1,fo-left,bl-10,ar-4-3,oit-false,e-usm-,oa-,obg-00AAFF55,ots-18,t-5,oh-20,cp-true,r-20,ox-20,ot-Image%20Text,oy-10,otc-00FFFF,di-folder@@file.jpg,h-600,b-5-A94D34,orig-true,rt-90,dpr-3,f-png,raw-w-200,h-200,lo-true,e-grayscale-,q-40,ott-b,bg-A94D34,w-400,pr-true,e-sharpen,oi-folder@@file.jpg,c-force,otf-Open%20Sans/default-image.jpg",
202+
"https://ik.imagekit.io/your_imagekit_id/tr:cm-extract,ofo-top,n-any_name,md-true,ow-20,e-contrast-1,oiar-oiar,fo-left,bl-10,ar-4-3,oit-oit,e-usm-,oidpr-oidpr,oa-,obg-00AAFF55,ots-18,t-5,oh-20,oic-oic,cp-true,r-20,ox-20,ot-Image%20Text,oy-10,otc-00FFFF,di-folder@@file.jpg,h-600,b-5-A94D34,orig-true,rt-90,dpr-3,f-png,raw-w-200,h-200,lo-true,e-grayscale-,oibg-oibg,q-40,ott-b,oib-oib,oiq-oiq,bg-A94D34,w-400,pr-true,e-sharpen,oi-oi,oifo-oifo,c-force,otf-Open%20Sans/default-image.jpg",
203203
is(url));
204204
}
205205

@@ -453,7 +453,7 @@ public void getUrl_with_signature() {
453453

454454
String url = SUT.getUrl(options);
455455

456-
assertSignedUrl("https://ik.imagekit.io/zv3rkhsym/tr:w-100/test-signed-url.png", url);
456+
assertSignedUrl("https://ik.imagekit.io/imagekit_id/tr:w-100/test-signed-url.png", url);
457457
}
458458

459459
@Test

imagekit-sdk/src/test/java/io/imagekit/sdk/ImageKitTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public void withTokenAndExpire_getAuthenticationParameters_successExpected() {
4848
assertNotNull(auth);
4949
assertEquals("your_token", auth.get("token"));
5050
assertEquals("1582269249", auth.get("expire"));
51-
assertEquals("98598e12a8eec9fedc883df4ae598618aaf24d87", auth.get("signature"));
51+
assertEquals("e71bcd6031016b060d349d212e23e85c791decdd", auth.get("signature"));
5252
}
5353

5454
@Test
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Copy this sample file add rename it to "config.properties"
22
# Put essential values of keys [UrlEndpoint, PrivateKey, PublicKey]
33

4-
UrlEndpoint=https://ik.imagekit.io/zv3rkhsym
5-
PrivateKey=private_kwTU4AR9Ei5hBoTIuxCW63Dg2jM=
6-
PublicKey=public_SSvmi6RknpNXj9x1cQnra1sYpJg=
4+
UrlEndpoint=https://ik.imagekit.io/imagekit_id
5+
PrivateKey=private_key_test
6+
PublicKey=public_key_test

0 commit comments

Comments
 (0)