Skip to content
New issue

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

怎么监听上传进度 #509

Open
lzy-h2o2 opened this issue Aug 22, 2023 · 1 comment
Open

怎么监听上传进度 #509

lzy-h2o2 opened this issue Aug 22, 2023 · 1 comment

Comments

@lzy-h2o2
Copy link

Config配置uploadTempDir后,会往这个目录写入数据,PostMapping(MultipartFile)的获取会一直阻塞,如果监听该目录的文件大小的话,因为temp文件会自动删除,时机处理起来稍微麻烦一些,能否提供个回调监听

@yanzhenjie
Copy link
Owner

我看了一下不会自动删除啊,是不是你们自己有删除逻辑。这个目前监听不了,内部接受到全部的数据后才会调用的api方法,因为socket底层就是这样的,只有接收到数据并解析后才能匹配到要调用你的哪个方法。你可以拿到MultipartFile后转移到你的目标位置。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants