asp.net MVC怎么给上传照片加文字水印,可以用js么

qq_22326361 2014-12-23 12:01:30
这是前台代码
<tr>
<td> 图片:</td>
<td>
<input type="file" name="fileUpload" id="fileUpload" style="width:250px;" />
</td>
<td width="26%">
<button id="sendBtn" type="submit" class="btn btn-primary" style=" height:25px; padding:2px; font-size:12px; width:40px;">保存</button>
</td>
</tr>

可不可以在js中$("#fileUpload")找到那个东西,然后用js添加文字水印呢,
...全文
684 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
qq_22326361 2014-12-23
  • 打赏
  • 举报
回复
有人解答么.
qq_22326361 2014-12-23
  • 打赏
  • 举报
回复
public ActionResult AddNewsPic(string id) { if (Request.Files.Count > 0) { if (!string.IsNullOrEmpty(Request.Files[0].FileName)) { Stream fileDataStream = null; int filelength = 0; byte[] byteImgData = null; fileDataStream = Request.Files[0].InputStream; filelength = Request.Files[0].ContentLength; byteImgData = new byte[filelength];//存储二进制 fileDataStream.Read(byteImgData, 0, filelength); string eid = Request.Form["id"].ToString(); string Summary = Request.Form["Summary"].ToString(); NewsBLL poluBLL = new NewsBLL(); bool temp = poluBLL.AddNewsPic(null, Summary, byteImgData, eid); } } ViewBag.eID = id; return View(); } 这是controller代码
hzsasheng 2014-12-23
  • 打赏
  • 举报
回复
可以在处理提交请求的controller 里面去加~
qq_22326361 2014-12-23
  • 打赏
  • 举报
回复
是在前台页面用js,还是controller,还是在BLL出加水印

1,979

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 其他语言讨论
社区管理员
  • 其他语言社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧