source/Repid.MvcExtension/UEditor/ActionEntrance.cs

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;

namespace Repid.MvcExtension.UEditor
{
    public static class ActionEntrance
    {
        public static void ProcessRequest(string tag)
        {
            HttpContext context = HttpContext.Current;
            Handler action = null;
            switch (tag)
            {
                case "uploadimage":
                    action = new UploadHandler(context, new UploadConfig()
                    {
                        AllowExtensions = Config.ImageAllowFiles,
                        PathFormat = Config.ImagePathFormat,
                        SizeLimit = Config.ImageMaxSize,
                        UploadFieldName = Config.ImageFieldName
                    });
                    break;
                case "uploadscrawl":
                    action = new UploadHandler(context, new UploadConfig()
                    {
                        AllowExtensions = new string[] { ".png" },
                        PathFormat = Config.ScrawlPathFormat,
                        SizeLimit = Config.ScrawlMaxSize,
                        UploadFieldName = Config.ScrawlFieldName,
                        Base64 = true,
                        Base64Filename = "scrawl.png"
                    });
                    break;
                case "uploadvideo":
                    action = new UploadHandler(context, new UploadConfig()
                    {
                        AllowExtensions = Config.VideoAllowFiles,
                        PathFormat = Config.VideoPathFormat,
                        SizeLimit = Config.VideoMaxSize,
                        UploadFieldName = Config.VideoFieldName
                    });
                    break;
                case "uploadfile":
                    action = new UploadHandler(context, new UploadConfig()
                    {
                        AllowExtensions = Config.FileAllowFiles,
                        PathFormat = Config.FilePathFormat,
                        SizeLimit = Config.FileMaxSize,
                        UploadFieldName = Config.FileFieldName
                    });
                    break;
                case "listimage":
                    action = new ListFileManager(context, Config.ImageManagerListPath, Config.ImageManagerAllowFiles);
                    break;
                case "listfile":
                    action = new ListFileManager(context, Config.FileManagerListPath, Config.FileManagerAllowFiles);
                    break;
后面还有 11 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。