NC Cloud 前台下载文件报错,提示检查文件服务器配置,如何排查?文件下载

/uploads/files_user1/question/5e8c37338290d484163.png

已邀请:

1、首先基于报错信息,排查文件服务器配置是否正常。如果是微服务模式,确保文件服务器业务服务已启动、已注册到注册中心,且环境类型正确。

2、基于报错信息,得知文件路径为“2a786927-8b4a-4ff7-b623-a05f0c55894a”,登录数据库查询文件信息

select * from sm_pub_filesystem  where pk_doc = '2a786927-8b4a-4ff7-b623-a05f0c55894a';

/uploads/files_user1/answer/5e8c3807cb375650836.png

3、基于查询到的内容中filepath字段的pk进行二次查询定位

select storepath,name,filepath from sm_pub_filesystem smfile left join bap_fs_header header on smfile.pk_doc = header.path  left join bap_fs_body fbody on header.guid = fbody.headid where smfile.filepath like '01A11000000001PD3E%'

/uploads/files_user1/answer/5e8c38469f5b9338248.png

4、基于得出的storepath,确认文件再数据库中存在以及保存在文件服务器的具体路径。

/ncc-uap-fs/ncc_2005_0327/uapattachroot/zjg_0/jlg_1/1585899142603_5528E7E3659303CAA3C7670882D32145.png

5、基于这个路径,登录文件服务器,查看确认对应路径下是否存在相应附件。




扩展.基于人员编码查询该人员上传的附件

select storepath,name,filepath from sm_pub_filesystem smfile left join bap_fs_header header on smfile.pk_doc = header.path  left join bap_fs_body fbody on header.guid = fbody.headid where smfile.filepath like '%人员编码%'

select pk_doc from sm_pub_filesystem where filepath like '%文件名%'
select guid from bap_fs_header where path='上个sql查的pk_doc'
select * from bap_fs_body where headid='上个sql查到的guid'


N合一

 select * from bap_fs_body where headid in(select guid from bap_fs_header where path in(select pk_doc from sm_pub_filesystem where filepath like '%文件名%'))


要回复问题请先登录注册