Hidistro.UI.Web/ueditor/controller.cs

(开头部分) 3KB

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

namespace WebSite.Public.plugins.ueditor
{
    using System;
    using System.Web;

    public class controller : IHttpHandler
    {
        public void ProcessRequest(HttpContext context)
        {
            Handler handler = null;
            switch (context.Request["action"])
            {
                case "config":
                    handler = new ConfigHandler(context);
                    break;

                case "uploadimage":
                {
                    UploadConfig config = new UploadConfig {
                        AllowExtensions = Config.GetStringList("imageAllowFiles"),
                        PathFormat = Config.GetString("imagePathFormat"),
                        SizeLimit = Config.GetInt("imageMaxSize"),
                        UploadFieldName = Config.GetString("imageFieldName")
                    };
                    handler = new UploadHandler(context, config);
                    break;
                }
                case "uploadscrawl":
                {
                    UploadConfig config2 = new UploadConfig {
                        AllowExtensions = new string[] { ".png" },
                        PathFormat = Config.GetString("scrawlPathFormat"),
                        SizeLimit = Config.GetInt("scrawlMaxSize"),
                        UploadFieldName = Config.GetString("scrawlFieldName"),
                        Base64 = true,
                        Base64Filename = "scrawl.png"
                    };
                    handler = new UploadHandler(context, config2);
                    break;
                }
                case "uploadvideo":
                {
                    UploadConfig config3 = new UploadConfig {
                        AllowExtensions = Config.GetStringList("videoAllowFiles"),
                        PathFormat = Config.GetString("videoPathFormat"),
                        SizeLimit = Config.GetInt("videoMaxSize"),
                        UploadFieldName = Config.GetString("videoFieldName")
                    };
                    handler = new UploadHandler(context, config3);
                    break;
                }
                case "uploadfile":
                {
                    UploadConfig config4 = new UploadConfig {
                        AllowExtensions = Config.GetStringList("fileAllowFiles"),
                        PathFormat = Config.GetString("filePathFormat"),
                        SizeLimit = Config.GetInt("fileMaxSize"),
                        UploadFieldName = Config.GetString("fileFieldName")
                    };
                    handler = new UploadHandler(context, config4);
后面还有 31 行代码,购买后查看完整代码

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

AI 解读 AI

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

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