以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 求助:利用摄像头拍照后,如何保存在表中的远端图片列中 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=54918) |
-- 作者:李孝春 -- 发布时间:2014/8/7 11:57:00 -- 求助:利用摄像头拍照后,如何保存在表中的远端图片列中 利用摄像头进行拍照 代码如下: Dim r As Row=Tables("订单编码.客户资料").Current Dim c As new camera c.capture() \'开始照相 If c.image IsNot Nothing Then \'照相成功 Dim s As String = r("身份证号") & "正面摄像" & Date.today & ".bmp" c.Save(ProjectPath & "\\Attachments\\" & s) \'照片复制到Attachments目录 r("身份证正面图") = s End If 在本地没有问题 但是一旦这个身份证正面图列弄成了网路远端保存图片后 不知道怎么操作了? 求修正
|
-- 作者:Bin -- 发布时间:2014/8/7 12:00:00 -- 拍下来后,再利用FTP代码上传 |
-- 作者:有点甜 -- 发布时间:2014/8/7 12:01:00 -- 1、设置成ftp图片列;
2、通过ftpclient的upload方法上传文件;
3、往表里写入ftp的路径。 |
-- 作者:李孝春 -- 发布时间:2014/8/7 12:06:00 -- 回复:(有点甜)?1、设置成ftp图片列;?... 有点甜 bin老师 代码这样写可以不呢? Dim c As new camera c.capture() \'开始照相 If c.image IsNot Nothing Then \'照相成功 Dim s As String = r("身份证号") & "正面摄像" & Date.today & ".bmp" c.Save(ProjectPath & "\\Attachments\\" & s) \'照片复制到Attachments目录 Dim ftp1 As New FtpClient ftp1.Host="196.128.143.28" ftp1.Account = "foxuser" ftp1.Password = "138238110" If ftp1.Upload("ProjectPath & "\\Attachments\\" & s","\\update\\Desert.jpg") = True Then 红色部分怎么改呢?因为不想指定名字 只想指定目录 Messagebox.show("上传完成!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information) Else Messagebox.show("上传失败!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information) End If r("身份证正面图") = s End If [此贴子已经被作者于2014-8-7 12:22:54编辑过]
|
-- 作者:有点甜 -- 发布时间:2014/8/7 14:09:00 -- Dim s As String = r("身份证号") & "正面摄像" & format(Date.today, "yyyyMMdd") & ".gif"
If ftp1.Upload(ProjectPath & "\\Attachments\\" & s,"\\gzsqykj\\" & s) = True Then |