2016-12-10 12:23:59 +08:00
|
|
|
|
using System.IO;
|
|
|
|
|
using System.Web;
|
|
|
|
|
|
|
|
|
|
namespace Bootstrap.Admin.Models
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
2017-03-23 17:21:58 +08:00
|
|
|
|
public class ProfilesModel : NavigatorBarModel
|
2016-12-10 12:23:59 +08:00
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获得/设置 头像文件大小
|
|
|
|
|
/// </summary>
|
2017-03-30 15:32:49 +08:00
|
|
|
|
public long Size { get; private set; }
|
2016-12-10 12:23:59 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="url"></param>
|
2017-03-23 17:21:58 +08:00
|
|
|
|
public ProfilesModel(string url) : base(url)
|
2016-12-10 12:23:59 +08:00
|
|
|
|
{
|
|
|
|
|
var fileName = HttpContext.Current.Server.MapPath(Icon);
|
|
|
|
|
if (File.Exists(fileName))
|
|
|
|
|
{
|
|
|
|
|
Size = new FileInfo(fileName).Length;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|