This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//not the glossary terms exactly but have a look at the code below to cobble something together | |
//have a look at this | |
//https://github.com/kgiszewski/G42.UmbracoGrease/blob/a48f1190c9252eab63b30ee70927a51d044fb90d/src/G42.UmbracoGrease/Extensions/StringExtensions.cs#L95-L183 | |
//this is a helper that is used in the above link | |
//https://github.com/kgiszewski/G42.UmbracoGrease/blob/master/src/G42.UmbracoGrease/G42TransformationHelper/TransformationHelper.cs | |
//then call it on a view like this | |
//@Model.Content.GetPropertyValue("anRteAlias").TransformImages(controllerContext...); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
imageUrl = image.GetCropUrl(width: 125, height: 125).ToAzureBlobUrl(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<caching currentCache="AzureBlobCache"> | |
<caches> | |
<cache name="AzureBlobCache" type="ImageProcessor.Web.Plugins.AzureBlobCache.AzureBlobCache, ImageProcessor.Web.Plugins.AzureBlobCache" maxDays="365"> | |
<settings> | |
<setting key="CachedStorageAccount" value="DefaultEndpointsProtocol=https;AccountName=accountgoeshere;AccountKey=keygoeshere" /> | |
<setting key="CachedBlobContainer" value="mediacacheContainerName" /> | |
<setting key="CachedCDNRoot" value="mycdnhostname" /> | |
<setting key="SourceStorageAccount" value="DefaultEndpointsProtocol=https;AccountName=accountgoeshere;AccountKey=keygoeshere" /> | |
<setting key="SourceBlobContainer" value="mediaContainerName" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[HttpPost] | |
public ActionResult UploadFile() | |
{ | |
var isSavedSuccessfully = true; | |
var fName = ""; | |
var newPath = string.Format("{0}{1}", Constants.TEMP_UPLOAD_PATH, DateTime.Now.Ticks.ToString()); | |
try | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Diagnostics; | |
using System.Net.Http; | |
using System.Threading.Tasks; | |
namespace MyWebJob | |
{ | |
class Program | |
{ | |
private static bool _isWaiting = true; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Web; | |
using HtmlAgilityPack; | |
namespace MyNamespace | |
{ | |
public class MyClass | |
{ | |
public IHtmlString DoSomething(string html) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var MyCustomTemplates = (function() { | |
//public functions | |
return { | |
Entity: function (value, scope, args) { | |
if(!args.entityType) { | |
args = {entityType: "Document", propertyName: "name"} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[HttpPost] | |
public object MyMethod(List<string> ids) | |
{ | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Register some JS with Umbraco | |
//~/App_Plugins/ArchetypeLabelTemplates/package.manifest | |
{ | |
"javascript": [ | |
"~/App_Plugins/ArchetypeLabelTemplates/urlpicker.js" | |
] | |
} | |
//Define your label code here | |
//~/App_Plugins/ArchetypeLabelTemplates/urlpicker.js |