Computer Engineering and Applications ›› 2009, Vol. 45 ›› Issue (5): 91-94.DOI: 10.3778/j.issn.1002-8331.2009.05.026

• 网络、通信、安全 • Previous Articles     Next Articles

Design and realization of progress display on large file upload package

BAI He1,2,LV Hong-liang2,WANG Jin-lin2   

  1. 1.Graduate University of Chinese Academy of Sciences,Beijing 100039,China
    2.National Network New Media Engineering Research Center,Institute of Acoustics,Chinese Academy of Sciences,Beijing 100190,China
  • Received:2008-08-07 Revised:2008-10-21 Online:2009-02-11 Published:2009-02-11
  • Contact: BAI He

进度显示的大文件上传组件的设计与实现

白 鹤1,2,吕红亮1,2,王劲林2   

  1. 1.中国科学院 研究生院,北京 100039
    2.中国科学院 声学研究所 国家网络新媒体工程技术研究中心,北京 100190
  • 通讯作者: 白 鹤

Abstract: File upload is a basic application on Internet,and the operation proposed in RFC1867 has some limitations on bad control ability and overtime for large file upload.An efficient large file upload package,UGiA-PHP-UPLOADER architecture based,is proposed,which can display progress.Its server listens high random port number for each upload connection,then parses received data according to protocol and generates temp status files while making use of hash mapping table to arrange these files;at the same time,the client requires data asynchronously with XMLHTTP to control progress bar.

Key words: XMLHTTP, file upload, progress display, large file, hash

摘要: 文件上传是互联网的一个基本应用,HTTP协议中RFC1867实现的操作存在可控性差、大文件传输易超时等不足。基于UGiA-PHP-UPLOADER架构,提出了一种支持进度显示的大文件高效上传的方法。它在服务器端通过自定义高端端口接收上传内容,遵循协议解析并生成状态文件,并基于哈希映射算法对临时文件分配存储;客户端使用XMLHTTP技术异步请求服务端数据指导进度条。

关键词: XMLHTTP, 文件上传, 进度显示, 大文件, 哈希表