imagekitio 3.0.0 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +31 -1
- data/lib/imagekitio/constants/file.rb +1 -1
- data/lib/imagekitio/sdk/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f841345e7c60108adfa1daec086a76fdd194202415904c18c61c14719424b224
|
|
4
|
+
data.tar.gz: 658901c8ad3a60f41bd1b1740fb188fd188edc569e0822947ede150916b567b9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cf58e04df78c584e13b049089eb2777aab6c232c4d99c0c0e6063f05f733895eb0eaf8625bfe4cc8da919c1231c08be2d4733cb30290cf9b7c422578c2021612
|
|
7
|
+
data.tar.gz: e037b5e7739d131f7496cb13944ee5eb0f2face165a22ce625b2458d11e58f3cd1d2cc4bf06fb5eb3b2e43e4c7cfc2687476695e8ff10f74a5527484ed9db500
|
data/README.md
CHANGED
|
@@ -443,7 +443,18 @@ imagekitio.upload_file(
|
|
|
443
443
|
file_name: "my_file_name.jpg", # required
|
|
444
444
|
response_fields: 'isPrivateFile, tags',
|
|
445
445
|
tags: %w[abc def],
|
|
446
|
-
use_unique_file_name: true
|
|
446
|
+
use_unique_file_name: true,
|
|
447
|
+
transformation: {
|
|
448
|
+
pre: 'l-text,i-Imagekit,fs-50,l-end',
|
|
449
|
+
post: [
|
|
450
|
+
{
|
|
451
|
+
type: 'transformation',
|
|
452
|
+
value: 'w-100'
|
|
453
|
+
}
|
|
454
|
+
]
|
|
455
|
+
},
|
|
456
|
+
checks: "'request.folder' : '/'" # To run server side checks before uploading files. Notice the quotes around file.size and 1mb.
|
|
457
|
+
is_published: true
|
|
447
458
|
)
|
|
448
459
|
|
|
449
460
|
```
|
|
@@ -470,6 +481,7 @@ imagekitio.list_files(
|
|
|
470
481
|
)
|
|
471
482
|
```
|
|
472
483
|
**Get File Details**
|
|
484
|
+
|
|
473
485
|
Accepts the file ID and fetches the details as per the [API documentation here](https://docs.imagekit.io/api-reference/media-api/get-file-details)
|
|
474
486
|
|
|
475
487
|
```ruby
|
|
@@ -479,6 +491,7 @@ imagekitio.get_file_details(
|
|
|
479
491
|
```
|
|
480
492
|
|
|
481
493
|
**Get File Metadata**
|
|
494
|
+
|
|
482
495
|
Accepts the file ID and fetches the metadata as per the [API documentation here](https://docs.imagekit.io/api-reference/metadata-api/get-image-metadata-for-uploaded-media-files)
|
|
483
496
|
```ruby
|
|
484
497
|
imagekit.get_file_metadata(
|
|
@@ -487,6 +500,7 @@ imagekit.get_file_metadata(
|
|
|
487
500
|
```
|
|
488
501
|
|
|
489
502
|
**Get File Metadata from remote url**
|
|
503
|
+
|
|
490
504
|
Accepts the remote file url and fetches the metadata as per the [API documentation here](https://docs.imagekit.io/api-reference/metadata-api/get-image-metadata-from-remote-url)
|
|
491
505
|
|
|
492
506
|
```ruby
|
|
@@ -496,6 +510,7 @@ imagekit.get_remote_file_url_metadata(
|
|
|
496
510
|
```
|
|
497
511
|
|
|
498
512
|
**Update File Details**
|
|
513
|
+
|
|
499
514
|
Update parameters associated with the file as per the [API documentation here](https://docs.imagekit.io/api-reference/media-api/update-file-details).
|
|
500
515
|
The first argument to the `update_field_details` method is the file ID, and a second argument is an object with the
|
|
501
516
|
parameters to be updated.
|
|
@@ -508,6 +523,21 @@ imagekitio.update_file_details(
|
|
|
508
523
|
)
|
|
509
524
|
```
|
|
510
525
|
|
|
526
|
+
|
|
527
|
+
**Update publish status**
|
|
528
|
+
|
|
529
|
+
If `publish` is included in the update options, no other parameters are allowed. If any are present, an error will be returned: `Your request cannot contain any other parameters when publish is present`.
|
|
530
|
+
|
|
531
|
+
```ruby
|
|
532
|
+
imagekitio.update_file_details(
|
|
533
|
+
file_id: '598821f949c0a938d57563bd',
|
|
534
|
+
publish:{
|
|
535
|
+
isPublished: true,
|
|
536
|
+
includeFileVersions: true
|
|
537
|
+
}
|
|
538
|
+
)
|
|
539
|
+
```
|
|
540
|
+
|
|
511
541
|
**Copy File**
|
|
512
542
|
|
|
513
543
|
Copy file from one path to another path using the source file path and the destination path as per the [API documentation here](https://docs.imagekit.io/api-reference/media-api/copy-file)
|
|
@@ -5,7 +5,7 @@ module ImageKitIo
|
|
|
5
5
|
|
|
6
6
|
VALID_FILE_DETAIL_OPTIONS = ["fileID"]
|
|
7
7
|
|
|
8
|
-
VALID_UPLOAD_OPTIONS = %w[file file_name use_unique_file_name tags folder is_private_file custom_coordinates response_fields extensions webhook_url overwrite_file overwrite_AI_tags overwrite_custom_metadata custom_metadata mime overwrite_tags content_type transformation ]
|
|
8
|
+
VALID_UPLOAD_OPTIONS = %w[file file_name use_unique_file_name tags folder is_private_file custom_coordinates response_fields extensions webhook_url overwrite_file overwrite_AI_tags overwrite_custom_metadata custom_metadata mime overwrite_tags content_type transformation checks is_published]
|
|
9
9
|
end
|
|
10
10
|
end
|
|
11
11
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: imagekitio
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.
|
|
4
|
+
version: 3.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- ImageKit.io team
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2024-
|
|
11
|
+
date: 2024-09-06 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: addressable
|