Sky.Education.Upload/UploadFile.cs

(开头部分) 5KB

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

namespace Sky.Education.Upload
{
    using System;
    using System.IO;

    public class UploadFile
    {
        private string m_clientName;
        private string m_contenttype;
        private long m_filelength;
        private string m_filename;
        private string m_filePath;

        public UploadFile(string i_name)
        {
            if ((i_name != null) && (i_name != string.Empty))
            {
                string str = string.Empty;
                this.m_clientName = string.Empty;
                this.m_filename = string.Empty;
                this.m_contenttype = string.Empty;
                this.m_filelength = 0L;
                if (this.IsContentHeader(i_name))
                {
                    str = i_name;
                }
                else if (this.IsContentHeader(WebbHelper.GetContext().Request[i_name]))
                {
                    str = WebbHelper.GetContext().Request[i_name];
                }
                if ((str != null) && (str != string.Empty))
                {
                    string[] strArray = str.Split(new char[] { ';' });
                    string str2 = strArray[0];
                    this.m_contenttype = str2.Substring(str2.IndexOf(":") + 1).Trim();
                    str2 = strArray[1];
                    this.m_clientName = str2.Substring(str2.IndexOf("\"") + 1, (str2.LastIndexOf("\"") - str2.IndexOf("\"")) - 1).Trim();
                    str2 = strArray[2];
                    this.m_filename = str2.Substring(str2.IndexOf("\"") + 1, (str2.LastIndexOf("\"") - str2.IndexOf("\"")) - 1).Trim();
                    string uploadFolder = WebbHelper.GetUploadFolder();
                    if ((this.m_filename != null) && (this.m_filename != string.Empty))
                    {
                        this.m_filePath = Path.Combine(uploadFolder, this.m_filename);
                        try
                        {
                            this.m_filelength = new FileInfo(this.m_filePath).Length;
                        }
                        catch (Exception exception)
                        {
                            string str4 = WebbHelper.GetContext().Request["Webb_Upload_GUID"];
                            if (str4 != null)
                            {
                                WebbHelper.GetContext().Application.Remove("Upload_Status_" + str4);
                            }
                            throw exception;
                        }
                    }
                }
            }
        }
后面还有 104 行代码,购买后查看完整代码

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

AI 解读

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

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