Beispiel #1
0
        public JsonResult TestLibraryFileDownload(int id, string fileName, string entityTypeCode)
        {
            var pathInfo = entityTypeCode == EntityTypeCode.ContentFile ? ContentFolderService.GetPathInfo(id) : SiteFolderService.GetPathInfo(id);

            if (pathInfo == null)
            {
                var formatString = entityTypeCode == EntityTypeCode.ContentFile ? LibraryStrings.ContentFolderNotExists : LibraryStrings.SiteFolderNotExists;
                return(Json(new { proceed = false, msg = string.Format(formatString, id) }, JsonRequestBehavior.AllowGet));
            }

            return(GetTestFileDownloadResult(pathInfo, fileName, false));
        }
Beispiel #2
0
        public JsonResult GetLibraryImageProperties(int id, string fileName, string entityTypeCode)
        {
            var pathInfo = entityTypeCode == EntityTypeCode.ContentFile ? ContentFolderService.GetPathInfo(id) : SiteFolderService.GetPathInfo(id);

            return(GetFileProperties(pathInfo, fileName, new FilePropertiesOptions()));
        }