2014-04-23 74 views

回答

0

從版本2.9開始,沒有指定此路徑的設置。路徑在Admin/Posts/Add_Entry.aspx.cs中的以下函數中進行計算。見線var dirName = ...

protected void BtnUploadImageClick(object sender, EventArgs e) 
{ 
    var dirName = string.Format("/{0}/{1}", DateTime.Now.ToString("yyyy"), DateTime.Now.ToString("MM")); 
    var dir = BlogService.GetDirectory(dirName); 
    var file = BlogService.UploadFile(txtUploadImage.PostedFile.InputStream, txtUploadImage.FileName, dir, true); 

    txtContent.Text += string.Format("<img src=\"{0}image.axd?picture={1}\" />", Utils.RelativeWebRoot, Server.UrlEncode(file.AsImage.FilePath)); 
    txtRawContent.Text += string.Format("<img src=\"{0}image.axd?picture={1}\" />", Utils.RelativeWebRoot, Server.UrlEncode(file.AsImage.FilePath)); 
}