|
50 | 50 | puts "------------------------------------------", "\n"
|
51 | 51 | puts "Upload Private with binary => ", upload
|
52 | 52 |
|
| 53 | +# Get all file versions |
| 54 | +versions = imagekitio.file_versions(file_id: upload[:response]['fileId']) |
| 55 | +puts '-------------------------------------------', "\n" |
| 56 | +puts "File versions =>", versions |
| 57 | + |
| 58 | +# Get file version detail |
| 59 | +details = imagekitio.file_version_detail(file_id: upload[:response]['fileId'], version_id: upload[:response]['versionInfo']['id']) |
| 60 | +puts '-------------------------------------------', "\n" |
| 61 | +puts "File version detail =>", details |
| 62 | + |
| 63 | +# Restore file version |
| 64 | +details = imagekitio.restore_file_version(file_id: upload[:response]['fileId'], version_id: upload[:response]['versionInfo']['id']) |
| 65 | +puts '-------------------------------------------', "\n" |
| 66 | +puts "Restore file version =>", details |
| 67 | + |
| 68 | +# Delete file version |
| 69 | +details = imagekitio.delete_file_version(file_id: upload[:response]['fileId'], version_id: upload[:response]['versionInfo']['id']) |
| 70 | +puts '-------------------------------------------', "\n" |
| 71 | +puts "Delete file version =>", details |
53 | 72 |
|
54 | 73 | # signed url
|
55 | 74 | url = imagekitio.url({path: upload[:response]["filePath"],
|
|
222 | 241 | }
|
223 | 242 | # "tags": ['image_tag1'],
|
224 | 243 | # "custom_coordinates": "10,10,100,200"
|
225 |
| - |
| 244 | + |
226 | 245 | )
|
227 | 246 | puts '--------------------------------'
|
228 | 247 | puts "updated details => #{updated_detail}"
|
|
0 commit comments