1.https://github.com/mrdoob/three.js
2.https://github.com/chrislusf/seaweedfs
3.http://my.heyany.com/testbook/458.html owncloud vs seafile
Last active
November 22, 2017 01:30
-
-
Save leapar/efc018e2e63bf069a9372cfb8e70dd38 to your computer and use it in GitHub Desktop.
gun
大文件上传
问题:
如果有几百M,几G的文件上传,怎么做?同时还需要进行续传。
- 上传客户端进行文件分片,例如2g文件=2102410241024=2000 0001024拆分成1024个文件片
- 客户端进行多线程上传,同时记录已经完成的文件片
- 服务器支持/upload接口,保存每一个文件片uid_index.data
- 客户端发现所有文件片都已经上传完成,调用/over接口进行文件片合并,同时进行checksum文件校验
- 最后把上传完毕的文件同步到hdfs中
支持文件分片上传的js客户端有:
- jQuery-File-Upload https://blueimp.github.io/jQuery-File-Upload/
- webuploader http://fex.baidu.com/webuploader/
- fineuploader https://fineuploader.com/
服务端代码:
- https://github.com/peinhu/AetherUpload-Laravel
- https://github.com/pionl/laravel-chunk-upload
- https://github.com/FineUploader/fineuploader-go-server
- https://github.com/FineUploader/spring-boot-server
完整例子
checksum
fineuploader
- 浏览器最大连接数 http://www.cnblogs.com/xiaoxiapier/p/4505117.html
- 默认是3个 可以修改maxConnections 达到更多 https://docs.fineuploader.com/api/options.html#maxConnections
<script>
// Some options to pass to the uploader are discussed on the next page
var uploader = new qq.FineUploader({
element: document.getElementById("uploader"),
//element: document.getElementById("fineuploader-container"),
request: {
endpoint: "http://127.0.0.1:8080/upload"
},
deleteFile: {
enabled: true,
endpoint: "http://127.0.0.1:8080/upload"
},
maxConnections:5,
chunking: {
enabled: true,
concurrent: {
enabled: true
},
success: {
endpoint: "http://127.0.0.1:8080/chunksdone"
}
},
resume: {
enabled: true
},
retry: {
enableAuto: true,
showButton: true
}
})
</script>
开启Threejs之旅 http://www.hewebgl.com/
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
upload
采用libuv的epoll方式实现的异步高性能libcurl发送数据的方法
http://blog.csdn.net/lijinqi1987/article/details/53996129