Skip to content

Commit 759b9e7

Browse files
authored
Fix encode url for fetch layer
1 parent 5566e59 commit 759b9e7

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

cloudinary-core/src/main/java/com/cloudinary/transformation/FetchLayer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public FetchLayer() {
99
}
1010

1111
public FetchLayer url(String remoteUrl) {
12-
this.publicId = Base64Coder.encodeString(remoteUrl);
12+
this.publicId = Base64Coder.encodeURLSafeString(remoteUrl);;
1313
return this;
1414
}
1515

cloudinary-core/src/test/java/com/cloudinary/test/CloudinaryTest.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1266,7 +1266,10 @@ public void testOverlayOptions() {
12661266
new FetchLayer().url("https://test"),
12671267
"fetch:aHR0cHM6Ly90ZXN0",
12681268
new FetchLayer().url("https://test").resourceType("video"),
1269-
"video:fetch:aHR0cHM6Ly90ZXN0"};
1269+
"video:fetch:aHR0cHM6Ly90ZXN0",
1270+
new FetchLayer().url("https://www.test.com/test/JE01118-YGP900_1_lar.jpg?version=432023"),
1271+
"fetch:aHR0cHM6Ly93d3cudGVzdC5jb20vdGVzdC9KRTAxMTE4LVlHUDkwMF8xX2xhci5qcGc_dmVyc2lvbj00MzIwMjM="
1272+
};
12701273

12711274
for (int i = 0; i < tests.length; i += 2) {
12721275
Object layer = tests[i];

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy