public static HtmlTag UploadedImage(this ISuperGlueView view, string fileName, ITransformFile transformer = null) { return(new HtmlTag("img") .Attr("src", FileUrl(view, fileName, transformer))); }
public static string FileUrl(this ISuperGlueView view, string fileName, ITransformFile transformer = null) { return(view.Environment.Resolve <IPersistFiles>().GetUrlFor(view.Environment, fileName, transformer)); }
public string GetUrlFor(IDictionary <string, object> environment, string file, ITransformFile transformer = null) { return($"/upload/{(transformer != null ? transformer.GetFileName(file) : file)}"); }