Exemple #1
0
 public ActionResult SiteImageThumbnail(string reference, long id)
 {
     if (reference.ToLower() == "items")
     {
         var bytes = BinaryUtilities.SiteImageThumbnail(new SiteModel(id));
         return(new FileContentResult(bytes, "image/png"));
     }
     else
     {
         return(null);
     }
 }
Exemple #2
0
 public FileContentResult SiteImageThumbnail(Context context, string reference, long id)
 {
     if (reference.ToLower() == "items")
     {
         var(bytes, contentType) = BinaryUtilities.SiteImageThumbnail(
             context: context,
             siteModel: new SiteModel(context: context, siteId: id));
         return(new FileContentResult(bytes, contentType));
     }
     else
     {
         return(null);
     }
 }