crash - 图片保存在服务器崩溃中
问题描述
\我需要很多用户编辑这个系统。但是图片保存了另一个用户条目。
如何解决这个问题呢
DocX 文档
for (int i = 1; i <= 2; i++)
{
if (i == 1) { Paragraph title = document.InsertParagraph().Append("" + TempData["Vkorg"] + "").FontSize(20); title.Alignment = Alignment.center; }
if (i == 1) { Paragraph title = document.InsertParagraph().Append("" + Urun + "").FontSize(20); title.Alignment = Alignment.center; }
}
var myImageFullPath = Path.Combine(Server.MapPath("\\Resim\\") + i + ".jpg");
{
// Add an image into the document.
Image image = document.AddImage(myImageFullPath);
// Create a picture (A custom view of an Image).
Picture picture = image.CreatePicture(400, 600);
// Insert a new Paragraph into the document.
if (i == 1) { Paragraph title = document.InsertParagraph().Append("" + Explanation1 + "").FontSize(12); title.Alignment = Alignment.center; }
if (i == 2) { Paragraph title = document.InsertParagraph().Append("" + Explanation2 + "").FontSize(12); title.Alignment = Alignment.center; }
}
}
// Insert a new Paragraph into the document.
Paragraph p1 = document.InsertParagraph();
// Append content to the Paragraph
p1.AppendPicture(picture);
//p1.AppendLine();
//p1.AppendPicture(picture);
// Save this document.
}
document.Save();
}
}
解决方案
推荐阅读
- ruby - 在 Lambda 中运行 ruby 时,“在任何来源中都找不到 public_suffix-3.0.2”
- lua - 如何获得佳能相机的相机角度?
- elasticsearch - 根据数组 ElasticSearch 中的项目过滤文档
- ruby-on-rails - 如何停止在重定向上发送预检请求?
- cakephp - 如何在 cakephp 3 中创建选项页面
- scale - 如何使用按钮更改模型的长度?
- c - GPS解析器功能不适用于新接收器
- split - 有没有办法将变量拆分为不同的列
- windows - 从 .ebextensions 将可执行文件添加到 Windows PATH,然后在后续命令中调用可执行文件
- unity3d - 统一不同屏幕尺寸下的不同物理行为