Skip to content

Commit abe3ac2

Browse files
committed
bumped to version 1.1.3
1 parent 9bcc893 commit abe3ac2

File tree

4 files changed

+16
-8
lines changed

4 files changed

+16
-8
lines changed

.github/ISSUE_TEMPLATE/feature_request.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ body:
4747
id: terms
4848
attributes:
4949
label: Code of Conduct
50-
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/nixrajput/flutter_carousel_widget/CODE_OF_CONDUCT.md).
50+
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/nixrajput/cloudinary-dart/CODE_OF_CONDUCT.md).
5151
options:
5252
- label: I agree to follow this project's Code of Conduct
5353
required: true

lib/src/api_client/cloudinary_api_client.dart

+12-6
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,15 @@ class CloudinaryApiClient extends CloudinaryApi {
8585
params['file'] = fileBytes != null
8686
? MultipartFile.fromBytes(
8787
fileBytes,
88-
filename: fileName ?? DateTime.now().millisecondsSinceEpoch.toString(),
88+
filename:
89+
fileName ?? DateTime.now().millisecondsSinceEpoch.toString(),
8990
)
9091
: (file!.startsWith('http://') || file.startsWith('https://'))
9192
? file
9293
: await MultipartFile.fromFile(file, filename: fileName);
9394
params['timestamp'] = timeStamp;
94-
params['signature'] = getSignature(secret: apiSecret, timeStamp: timeStamp, params: params);
95+
params['signature'] =
96+
getSignature(secret: apiSecret, timeStamp: timeStamp, params: params);
9597

9698
var formData = FormData.fromMap(params);
9799

@@ -154,7 +156,8 @@ class CloudinaryApiClient extends CloudinaryApi {
154156

155157
final params = <String, dynamic>{
156158
'upload_preset': uploadPreset,
157-
if (publicId != null || fileName != null) 'public_id': publicId ?? fileName,
159+
if (publicId != null || fileName != null)
160+
'public_id': publicId ?? fileName,
158161
if (folder != null) 'folder': folder,
159162

160163
/// Setting the optParams... this would override the public_id and folder
@@ -164,7 +167,8 @@ class CloudinaryApiClient extends CloudinaryApi {
164167

165168
params['file'] = fileBytes != null
166169
? MultipartFile.fromBytes(fileBytes,
167-
filename: fileName ?? DateTime.now().millisecondsSinceEpoch.toString())
170+
filename:
171+
fileName ?? DateTime.now().millisecondsSinceEpoch.toString())
168172
: (file!.startsWith('http://') || file.startsWith('https://'))
169173
? file
170174
: await MultipartFile.fromFile(file, filename: fileName);
@@ -223,15 +227,17 @@ class CloudinaryApiClient extends CloudinaryApi {
223227
params['public_id'] = publicId;
224228
params['api_key'] = apiKey;
225229
params['timestamp'] = timeStamp;
226-
params['signature'] = getSignature(secret: apiSecret, timeStamp: timeStamp, params: params);
230+
params['signature'] =
231+
getSignature(secret: apiSecret, timeStamp: timeStamp, params: params);
227232

228233
var formData = FormData.fromMap(params);
229234

230235
Response<dynamic> response;
231236
CloudinaryResponse cloudinaryResponse;
232237
int? statusCode;
233238
try {
234-
response = await post('$cloudName/${resourceType.name}/destroy', data: formData);
239+
response =
240+
await post('$cloudName/${resourceType.name}/destroy', data: formData);
235241
statusCode = response.statusCode;
236242
cloudinaryResponse = CloudinaryResponse.fromJsonMap(response.data);
237243
} catch (error, stacktrace) {

lib/src/cloudinary_base.dart

+2
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ class Cloudinary {
5050
Cloudinary._(cloudName: cloudName);
5151

5252
String get apiKey => _client.apiKey;
53+
5354
String get apiSecret => _client.apiSecret;
55+
5456
String get cloudName => _client.cloudName;
5557

5658
/// Uploads a file of [resourceType] with [fileName] to a [folder]

pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: cloudinary
22
description: A dart package to integrate Cloudinary API in Dart and Flutter.
33

4-
version: 1.1.2
4+
version: 1.1.3
55

66
homepage: https://github.com/nixrajput
77
repository: https://github.com/nixrajput/cloudinary-dart

0 commit comments

Comments
 (0)