File tree Expand file tree Collapse file tree 2 files changed +14
-5
lines changed Expand file tree Collapse file tree 2 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -1289,7 +1289,7 @@ def process_layer(layer, layer_parameter):
1289
1289
text = '' .join (encoded_text )
1290
1290
components .append (text )
1291
1291
elif type == "fetch" :
1292
- b64 = base64_encode_url (fetch_url )
1292
+ b64 = base64url_encode (fetch_url )
1293
1293
components .append (b64 )
1294
1294
else :
1295
1295
public_id = public_id .replace ("/" , ':' )
Original file line number Diff line number Diff line change @@ -455,8 +455,18 @@ def test_fetch_overlay(self):
455
455
expected_url = (
456
456
DEFAULT_UPLOAD_PATH +
457
457
"l_fetch:"
458
- "aHR0cHM6Ly91cGxvYWQud2lraW1lZGlhLm9yZy93aWtpcGVkaWEvY29"
459
- "tbW9ucy8yLzJiLyVFQSVCMyVBMCVFQyVCMCVCRCVFQSVCMCVBRiVFQiVCMiU4Qy5qcGc=/"
458
+ "aHR0cHM6Ly91cGxvYWQud2lraW1lZGlhLm9yZy93aWtpcGVkaWEvY29tbW9ucy8yLzJiL-qzoOywveqwr-uyjC5qcGc=/"
459
+ "test" ))
460
+
461
+ self .__test_cloudinary_url (
462
+ options = {
463
+ "overlay" : {
464
+ "url" :
465
+ "https://www.test.com/test/JE01118-YGP900_1_lar.jpg?version=432023" }},
466
+ expected_url = (
467
+ DEFAULT_UPLOAD_PATH +
468
+ "l_fetch:"
469
+ "aHR0cHM6Ly93d3cudGVzdC5jb20vdGVzdC9KRTAxMTE4LVlHUDkwMF8xX2xhci5qcGc_dmVyc2lvbj00MzIwMjM=/"
460
470
"test" ))
461
471
462
472
def test_underlay (self ):
@@ -960,8 +970,7 @@ def test_overlay_options(self):
960
970
'font_family' : "Arial" , 'font_size' : 40 },
961
971
"subtitles:Arial_40:sample_sub_he.srt" ),
962
972
({'url' : "https://upload.wikimedia.org/wikipedia/commons/2/2b/고창갯벌.jpg" },
963
- "fetch:aHR0cHM6Ly91cGxvYWQud2lraW1lZGlhLm9yZy93aWtpcGVkaWEvY29"
964
- "tbW9ucy8yLzJiLyVFQSVCMyVBMCVFQyVCMCVCRCVFQSVCMCVBRiVFQiVCMiU4Qy5qcGc=" ),
973
+ "fetch:aHR0cHM6Ly91cGxvYWQud2lraW1lZGlhLm9yZy93aWtpcGVkaWEvY29tbW9ucy8yLzJiL-qzoOywveqwr-uyjC5qcGc=" ),
965
974
({'url' : FETCH_VIDEO_URL , "resource_type" : "video" },
966
975
"video:fetch:aHR0cHM6Ly9kZW1vLXJlcy5jbG91ZGluYXJ5LmNvbS92aWRlb3MvZG9nLm1wNA==" )
967
976
]
You can’t perform that action at this time.
0 commit comments