Skip to content

Commit

Permalink
feat(cloudinary): make bytes available on iOS (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
robingenz authored Feb 27, 2024
1 parent 965e912 commit de6bcf8
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/blue-rocks-ring.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@capawesome/capacitor-cloudinary': minor
---

feat(ios): make `bytes` available
2 changes: 1 addition & 1 deletion packages/cloudinary/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ further processing after downloading.
| Prop | Type | Description | Since |
| ---------------------- | ----------------------------------------------------- | ---------------------------------------------------------------------------------------- | ----- |
| **`assetId`** | <code>string</code> | The unique asset identifier of the uploaded resource. Only available on Android and Web. | 0.0.1 |
| **`bytes`** | <code>number</code> | The number of bytes of the uploaded resource. Only available on Android and Web. | 0.0.1 |
| **`bytes`** | <code>number</code> | The number of bytes of the uploaded resource. | 0.0.1 |
| **`createdAt`** | <code>string</code> | The timestamp at which the resource was uploaded. | 0.0.1 |
| **`duration`** | <code>number</code> | The duration of the uploaded resource in seconds. | 0.1.5 |
| **`format`** | <code>string</code> | The format of the uploaded resource. | 0.0.1 |
Expand Down
2 changes: 1 addition & 1 deletion packages/cloudinary/docs/utils/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Download a file from Cloudinary as a blob.
| Prop | Type | Description | Since |
| ---------------------- | ----------------------------------------------------- | ---------------------------------------------------------------------------------------- | ----- |
| **`assetId`** | <code>string</code> | The unique asset identifier of the uploaded resource. Only available on Android and Web. | 0.0.1 |
| **`bytes`** | <code>number</code> | The number of bytes of the uploaded resource. Only available on Android and Web. | 0.0.1 |
| **`bytes`** | <code>number</code> | The number of bytes of the uploaded resource. | 0.0.1 |
| **`createdAt`** | <code>string</code> | The timestamp at which the resource was uploaded. | 0.0.1 |
| **`duration`** | <code>number</code> | The duration of the uploaded resource in seconds. | 0.1.5 |
| **`format`** | <code>string</code> | The format of the uploaded resource. | 0.0.1 |
Expand Down
1 change: 1 addition & 0 deletions packages/cloudinary/ios/Plugin/CloudinaryHelper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ public class CloudinaryHelper {

public static func createUploadResourceResult(_ resultData: CLDUploadResult) -> JSObject {
var result = JSObject()
result["bytes"] = resultData.length
result["createdAt"] = resultData.createdAt
result["duration"] = resultData.duration
result["format"] = resultData.format
Expand Down
4 changes: 1 addition & 3 deletions packages/cloudinary/src/definitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,9 @@ export interface UploadResourceResult {
/**
* The number of bytes of the uploaded resource.
*
* Only available on Android and Web.
*
* @since 0.0.1
*/
bytes?: number;
bytes: number;
/**
* The timestamp at which the resource was uploaded.
*
Expand Down

0 comments on commit de6bcf8

Please sign in to comment.