File tree Expand file tree Collapse file tree 3 files changed +16
-6
lines changed
CloudinaryDotNet.IntegrationTests/UploadApi
CloudinaryDotNet.Tests/Transformations/Image Expand file tree Collapse file tree 3 files changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -518,7 +518,7 @@ public void TestUploadAnsiAndUnicode()
518518
519519 var expectedUrl = uploadresponse . SecureUrl . OriginalString ;
520520
521- var computedUrl = m_cloudinary . Api . UrlImgUp . Action ( "authenticated" ) . Version ( uploadresponse . Version ) . Secure ( true ) . Signed ( true ) . BuildUrl ( publicId + ".jpg" ) ;
521+ var computedUrl = m_cloudinary . Api . UrlImgUp . Type ( "authenticated" ) . Version ( uploadresponse . Version ) . Secure ( true ) . Signed ( true ) . BuildUrl ( publicId + ".jpg" ) ;
522522
523523 Assert . AreEqual ( expectedUrl , computedUrl ) ;
524524
Original file line number Diff line number Diff line change @@ -29,10 +29,10 @@ public void TestSprite()
2929 {
3030 // should build urls to get sprite css and picture by tag (with transformations and prefix)
3131
32- var uri = m_api . UrlImgUp . Action ( "sprite" ) . BuildUrl ( "teslistresourcesbytag1.png" ) ;
32+ var uri = m_api . UrlImgUp . Type ( "sprite" ) . BuildUrl ( "teslistresourcesbytag1.png" ) ;
3333 Assert . AreEqual ( TestConstants . DefaultRootPath + "image/sprite/teslistresourcesbytag1.png" , uri ) ;
3434
35- uri = m_api . UrlImgUp . Action ( "sprite" ) . BuildUrl ( "teslistresourcesbytag1.css" ) ;
35+ uri = m_api . UrlImgUp . Type ( "sprite" ) . BuildUrl ( "teslistresourcesbytag1.css" ) ;
3636 Assert . AreEqual ( TestConstants . DefaultRootPath + "image/sprite/teslistresourcesbytag1.css" , uri ) ;
3737
3838 uri = m_api . ApiUrlImgUpV . CloudinaryAddr ( "http://api.cloudinary.com" ) . Action ( "sprite" ) . BuildUrl ( ) ;
@@ -44,7 +44,7 @@ public void TestSpriteCssPrefix()
4444 {
4545 // should build urls to get sprite css and picture by tag with prefix
4646
47- string uri = m_api . UrlImgUp . Action ( "sprite" ) . Add ( "p_home_thing_" ) . BuildUrl ( "logo.css" ) ;
47+ string uri = m_api . UrlImgUp . Type ( "sprite" ) . Add ( "p_home_thing_" ) . BuildUrl ( "logo.css" ) ;
4848 Assert . AreEqual ( TestConstants . DefaultRootPath + "image/sprite/p_home_thing_/logo.css" , uri ) ;
4949 }
5050
Original file line number Diff line number Diff line change @@ -314,16 +314,26 @@ public Url VideoSources(params VideoSource[] videoSources)
314314 }
315315
316316 /// <summary>
317- /// Add action to the URL.
317+ /// Set action of the URL.
318318 /// </summary>
319319 /// <param name="action">The action.</param>
320- /// <returns>The delivery URL with action applied.</returns>
320+ /// <returns>The delivery/API URL with action applied.</returns>
321321 public Url Action ( string action )
322322 {
323323 m_action = action ;
324324 return this ;
325325 }
326326
327+ /// <summary>
328+ /// Set delivery type of the asset URL.
329+ /// </summary>
330+ /// <param name="deliveryType">The delivery type of the asset.</param>
331+ /// <returns>The delivery URL with delivery type applied.</returns>
332+ public Url Type ( string deliveryType )
333+ {
334+ return Action ( deliveryType ) ;
335+ }
336+
327337 /// <summary>
328338 /// Set the version of the cloudinary API.
329339 /// </summary>
You can’t perform that action at this time.
0 commit comments