Skip to content

Commit a811982

Browse files
author
Daniel Cohen
committed
eager upload params can be both string or List<Transformation>
1 parent 03b55d3 commit a811982

File tree

1 file changed

+4
-1
lines changed
  • cloudinary-core/src/main/java/com/cloudinary

1 file changed

+4
-1
lines changed

cloudinary-core/src/main/java/com/cloudinary/Util.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ public static final Map<String, Object> buildUploadParams(Map options) {
3434
if (value != null)
3535
params.put(attr, value.toString());
3636
}
37-
params.put("eager", buildEager((List<Transformation>) options.get("eager")));
37+
Object eagerObj = options.get("eager");
38+
String eager = eagerObj instanceof String ? eagerObj.toString() : buildEager((List<Transformation>) options.get("eager"));
39+
40+
params.put("eager", eager);
3841
params.put("notification_url", (String) options.get("notification_url"));
3942
params.put("eager_notification_url", (String) options.get("eager_notification_url"));
4043
params.put("proxy", (String) options.get("proxy"));

0 commit comments

Comments
 (0)