Example #1
0
        public virtual ActionResult Editor(FileUploadSettings settings, string model)
        {
            var mediaIds = model.ToIntCollection();
            var media    = _umbracoHelper.TypedMedia(mediaIds);
            var files    = media.Select(MapToFileModel);

            var viewModel = new FileUploadEditViewModel
            {
                Settings = settings,
                Files    = files
            };

            return(View("~/App_Plugins/Core/Controls/FileUpload/FileUploadEditView.cshtml", viewModel));
        }
Example #2
0
        public ActionResult Editor(FileUploadSettings settings, string model)
        {
            var mediaIds = model.ToIntCollection();
            var media    = _umbracoHelper.TypedMedia(mediaIds);
            var files    = media.Select(s => new FileViewModel
            {
                Id        = s.Id,
                Url       = s.GetCropUrl(UmbracoAliases.GalleryPreviewImageCrop),
                Extension = s.GetMediaExtension(),
                Type      = s.GetMediaType(),
                FileName  = s.Name
            });

            var viewModel = new FileUploadEditViewModel
            {
                Settings = settings,
                Files    = files
            };

            return(View("~/App_Plugins/Core/Controls/FileUpload/FileUploadEditView.cshtml", viewModel));
        }
Example #3
0
 public virtual ActionResult Uploader(FileUploadSettings settings)
 {
     return(View("~/App_Plugins/Core/Controls/FileUpload/FileUploadView.cshtml", settings));
 }