Hidistro.UI.Web/Admin/UploadFileJson.cs
(开头部分) 5KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
namespace Hidistro.UI.Web.Admin
{
using Hidistro.ControlPanel.Store;
using Hidistro.Core;
using Hidistro.UI.ControlPanel.Utility;
using LitJson;
using Microsoft.Practices.EnterpriseLibrary.Data;
using System;
using System.Collections;
using System.Data;
using System.Data.Common;
using System.Globalization;
using System.IO;
using System.Web;
public class UploadFileJson : AdminPage
{
private string savePath;
private string saveUrl;
protected UploadFileJson() : base("m01", "00000")
{
}
protected void Page_Load(object sender, EventArgs e)
{
if (ManagerHelper.GetCurrentManager() == null)
{
this.showError("您没有权限执行此操作!");
}
else
{
this.savePath = "~/Storage/master/gallery/";
this.saveUrl = "/Storage/master/gallery/";
int result = 0;
if (base.Request.Form["fileCategory"] != null)
{
int.TryParse(base.Request.Form["fileCategory"], out result);
}
string str = string.Empty;
if (base.Request.Form["imgTitle"] != null)
{
str = base.Request.Form["imgTitle"];
}
HttpPostedFile postedFile = base.Request.Files["imgFile"];
if (postedFile == null)
{
this.showError("请先选择文件!");
}
else if (!ResourcesHelper.CheckPostedFile(postedFile, "image"))
{
this.showError("不能上传空文件,且必须是有效的图片文件!");
}
else
{
string path = base.Server.MapPath(this.savePath);
if (!Directory.Exists(path))
{
this.showError("上传目录不存在。");
}
后面还有 57 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
