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