Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public class CloudinaryUploadTag extends SimpleTagSupport {
private String tags = null;
private String fieldName;
private String resourceType = "auto";
private String transformation;

public void doTag() throws JspException, IOException {
Cloudinary cloudinary = Singleton.getCloudinary();
Expand All @@ -37,6 +38,7 @@ public void doTag() throws JspException, IOException {

Map<String, String> options = new HashMap<String, String>();
options.put("resource_type", resourceType);
options.put("transformation", transformation);
if (tags != null) {
options.put("tags", tags);
}
Expand Down Expand Up @@ -85,6 +87,14 @@ public void setFieldName(String fieldName) {
public String getFieldName() {
return fieldName;
}

public void setTransformation(String transformation) {
this.transformation = transformation;
}

public String getTransformation() {
return transformation;
}

public void setResourceType(String resourceType) {
this.resourceType = resourceType;
Expand Down
5 changes: 5 additions & 0 deletions cloudinary-taglib/src/main/resources/META-INF/cloudinary.tld
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>transformation</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
<tag>
<name>image</name>
Expand Down