Skip to content

Commit 5b0cc2a

Browse files
richgiegtocker
authored andcommitted
Pass moderation param in explicit call (#59)
* Pass moderation param in explicit call * Add test for moderation param in explicit call
1 parent 480213d commit 5b0cc2a

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ public Map explicit(String publicId, Map options) throws IOException {
192192
params.put("eager_notification_url", (String) options.get("eager_notification_url"));
193193
params.put("headers", Util.buildCustomHeaders(options.get("headers")));
194194
params.put("tags", StringUtils.join(ObjectUtils.asArray(options.get("tags")), ","));
195+
params.put("moderation", (String) options.get("moderation"));
195196
if (options.get("face_coordinates") != null) {
196197
params.put("face_coordinates", Coordinates.parseCoordinates(options.get("face_coordinates")).toString());
197198
}

cloudinary-test-common/src/main/java/com/cloudinary/test/AbstractUploaderTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ public void testUniqueFilename() throws Exception {
155155

156156
@Test
157157
public void testExplicit() throws IOException {
158-
Map result = cloudinary.uploader().explicit("sample", asMap("eager", Collections.singletonList(new Transformation().crop("scale").width(2.0)), "type", "upload"));
158+
Map result = cloudinary.uploader().explicit("sample", asMap("eager", Collections.singletonList(new Transformation().crop("scale").width(2.0)), "type", "upload", "moderation", "manual"));
159159
String url = cloudinary.url().transformation(new Transformation().crop("scale").width(2.0)).format("jpg").version(result.get("version")).generate("sample");
160160
String eagerUrl = (String) ((Map) ((List) result.get("eager")).get(0)).get("url");
161161
String cloudName = cloudinary.config.cloudName;

0 commit comments

Comments
 (0)