TrainSignManage/services/ImgCommonUpfile.ashx.cs

(开头部分) 10KB

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

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Collections;
using System.Drawing.Drawing2D;
using System.Globalization;
using TindWit.Common;
using Common;
using System.Configuration;

namespace witAdmin.services
{



    public class ImgCommonUpfile : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            string type = HttpContext.Current.Request["a"];
            try
            {
                UploadPicture(type);
            }
            catch
            {

            }
        }

        public void UploadPicture(string type)
        {
            string newurl = "";
            Hashtable extTable = new Hashtable();
            extTable.Add("image", "gif,jpg,jpeg,png,bmp");

            //最大文件大小
            String newFileName = "";

            HttpPostedFile imgFile = HttpContext.Current.Request.Files[type];


            if (imgFile == null)
            {
                showError("请选择文件。");
            }
            String saveFolder = "/Upfile/";
            string qianMianPath = HttpContext.Current.Server.MapPath("~/");
            String zhiJiePath = qianMianPath + @"/" + saveFolder;


            String fileName = imgFile.FileName;
            String fileExt = Path.GetExtension(fileName).ToLower();

            if (!Directory.Exists(zhiJiePath))
后面还有 204 行代码,购买后查看完整代码

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

AI 解读 AI

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

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