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

超过一个切片时生成的文件损坏 #14

Open
tuhongwei opened this issue Feb 26, 2021 · 1 comment
Open

超过一个切片时生成的文件损坏 #14

tuhongwei opened this issue Feb 26, 2021 · 1 comment

Comments

@tuhongwei
Copy link

当把SIZE值设定为一个较小值,导致有超过一个切片出现时,就会出现最后生成的文件损坏的情况

@tuhongwei
Copy link
Author

tuhongwei commented Feb 26, 2021

原因貌似是多次调用fse.createWriteStream创建多个writeStream导致的,找到了一种解决办法
https://github.com/tuhongwei/implement/blob/master/file-upload/server/controller.js

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

No branches or pull requests

1 participant