Foxtable(狐表)用户栏目专家坐堂 → 文件管理器


  共有2785人关注过本帖树形打印复制链接

主题:文件管理器

帅哥哟,离线,有人找我吗?
有点蓝
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:107479 积分:546674 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2020/10/29 8:51:00 [显示全部帖子]

自行添加上传按钮,写代码上传:http://www.foxtable.com/webhelp/topics/2697.htm

 回到顶部
帅哥哟,离线,有人找我吗?
有点蓝
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:107479 积分:546674 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2020/11/2 11:17:00 [显示全部帖子]

Dim ftp1 As New FtpClient
ftp1
.Host="196.128.143.28"
ftp1
.Account = "foxuser"
ftp1
.Password = "138238110"
If 
ftp1.Upload("c:\data\Desert.jpg","\ZZFJ\Desert.jpg") = True Then
    
Messagebox.show("上传完成!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
Else
    
Messagebox.show("上传失败!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
End If

Dim flm As WinForm.FileManager = e.Form.Controls("FileManager1")
flm.AddFile(\ZZFJ\Desert.jpg)

 回到顶部
帅哥哟,离线,有人找我吗?
有点蓝
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:107479 积分:546674 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2020/11/2 14:35:00 [显示全部帖子]

贴出代码说明

 回到顶部
帅哥哟,离线,有人找我吗?
有点蓝
  4楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:107479 积分:546674 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2020/11/2 15:26:00 [显示全部帖子]

If ftp1.Upload(e.Form.Controls("textbox2").value,"\ZZFJ\" & FileSys.GetName(e.Form.Controls("textbox2").value)) = True Then

方法1、不用原来的功能,自己使用按钮写代码处理,就可以灵活的控制取消

 回到顶部
帅哥哟,离线,有人找我吗?
有点蓝
  5楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:107479 积分:546674 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2020/11/2 20:13:00 [显示全部帖子]

Dim ftp1 As New FtpClient
ftp1
.Host="196.128.143.28"
ftp1
.Account = "foxuser"
ftp1
.Password = "138238110"
dim file as string = "\ZZFJ\" & FileSys.GetName(e.Form.Controls("textbox2").value)
If ftp1.Upload(e.Form.Controls("textbox2").value,file ) = True Then
    
Messagebox.show("上传完成!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
Dim flm As WinForm.FileManager = e.Form.Controls("FileManager1")
flm.AddFile(file)
Else
    
Messagebox.show("上传失败!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
End If

[此贴子已经被作者于2020/11/3 8:31:05编辑过]

 回到顶部
帅哥哟,离线,有人找我吗?
有点蓝
  6楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:107479 积分:546674 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2020/11/3 8:34:00 [显示全部帖子]

Dim ftp1 As New FtpClient
ftp1
.Host="196.128.143.28"
ftp1
.Account = "foxuser"
ftp1
.Password = "138238110"
文件名不用出现多个点号
dim file as string = "\ZZFJ\CODE_text" & format(date.now,"yyyyMMddHHmmss") & FileSys.GetName(e.Form.Controls("textbox2").value)
If ftp1.Upload(e.Form.Controls("textbox2").value,file ) = True Then
    
Messagebox.show("上传完成!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
Dim flm As WinForm.FileManager = e.Form.Controls("FileManager1")
flm.AddFile(file)
Else
    
Messagebox.show("上传失败!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
End If

 回到顶部