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