拆分大文件采用了棱角分明的上载 [英] Split a big file to be upload using angular

查看:221
本文介绍了拆分大文件采用了棱角分明的上载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要分裂一个大文件到2MB部位要sended到服务器,但我找不到任何办法。对角或JavaScript。现在,我使用angularFileUpload得到它,并把它作为一个大文件。如果有人有线索,请让我知道

I have to split a big file into 2mb parts to be sended into a server but i could not find any way. on angular or javascript. Right now i am using angularFileUpload to get it and send it as a big file. if anyone have a clue please let me know

推荐答案

您必须使用HTML5文件API。关于它的更多信息,你可以找到这里。我不能提供任何code为例,主要是因为我不知道你的服务器的外观。你必须给用户一个交易令牌,他将不得不向您发送的块号,块数据和令牌,这样你就可以重新组装在服务器上。

You have to use the HTML5 file API. More info about it you can find here. I can't provide any code example, mainly because i don't know how your server looks. You have to give the user a transaction token, and he will have to send you the chunk number, chunk data and the token, so you'll be able to re-assemble it on the server.

这篇关于拆分大文件采用了棱角分明的上载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆