We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
您好,我使用的版本是5.2.2,目前遇到一个需求,就是有些部门上传文件后,希望下载以后仍然保留上传文件时,文件所在电脑的“最后修改时间”。能否给点意见,该如何实现,谢谢
The text was updated successfully, but these errors were encountered:
这个应该是不好实现,前台写js倒是能获取文件的修改时间,但是不一定准确,即使准确,框架目前的上传并没有获取这个时间,除非你不用框架提供的上传控件,自己重新写上传的逻辑。
Sorry, something went wrong.
我用的是https://github.com/hql7/wl-explorer 分享一下实现: 前端获取编辑时间 let formData = new FormData() // 用FormData存放上传文件 this.fileList.forEach(file => { formData.append('file', file.raw); // 将最后编辑时间添加到FormData let dateTime = this.msToDate(file.raw.lastModifiedDate); formData.append('lastEditTime', dateTime.hasTime); })
let formData = new FormData() // 用FormData存放上传文件 this.fileList.forEach(file => { formData.append('file', file.raw); // 将最后编辑时间添加到FormData let dateTime = this.msToDate(file.raw.lastModifiedDate); formData.append('lastEditTime', dateTime.hasTime); })
后端通过读取lastEditTime获取文件列表的这个时间然后存储文件的时候把时间作为一个字段到数据库里面。下载的时候再去设置这个时间
No branches or pull requests
您好,我使用的版本是5.2.2,目前遇到一个需求,就是有些部门上传文件后,希望下载以后仍然保留上传文件时,文件所在电脑的“最后修改时间”。能否给点意见,该如何实现,谢谢
The text was updated successfully, but these errors were encountered: