用户名: 密码: 验证码:
一种基于Base64编码的多图片上传技术研究
详细信息    查看全文 | 推荐本文 |
  • 英文篇名:Research on Multi Image Uploading Technology Based on Base64 Encoding
  • 作者:周岚
  • 英文作者:ZHOU Lan;Department of information technology, Xuzhou Vocational College of Finance and economics;
  • 关键词:HTML5 ; FormData ; Base64 ; 文件上传
  • 英文关键词:HTML5;;FormData;;Base64;;file upload
  • 中文刊名:DNZS
  • 英文刊名:Computer Knowledge and Technology
  • 机构:江苏省徐州财经高等职业技术学校信息技术系;
  • 出版日期:2018-11-05
  • 出版单位:电脑知识与技术
  • 年:2018
  • 期:v.14
  • 语种:中文;
  • 页:DNZS201831045
  • 页数:3
  • CN:31
  • ISSN:34-1205/TP
  • 分类号:112-114
摘要
基于传统的HTML5多文件上传采用FormData方式,将文件数据编译成键值对,用异步请求方式上传文件,但是不同浏览器对FormData对象的支持情况并不容乐观,导致不支持FormData的浏览器文件上传失败。该文针对浏览器不支持FormData对象操作,提出在基于浏览器客户端对图片进行Base64编码,将图片转换为字符串提交,在服务器端再对其进行解码后再生成图片文件的通用图片上传方法。
        Based on the traditional HTML5 multi-file uploading method, the file data is compiled into key-value pairs and upload-ed asynchronously. However, the support of different browsers for FormData objects is not optimistic, which leads to the failure offile uploading in browsers that do not support FormData. In view of the fact that browsers do not support the operation of FormDataobjects, this paper proposes a general image uploading method based on browser client to encode pictures by Base64, convert pic-tures to string submission, decode them on the server and regenerate them into picture files.
引文
[1]刘耀钦.利用HTML5拖放技术实现多文件异步上传[J].四川理工学院学报:自然科学版, 2015(1):1673-1549.
    [2]糜梅.基于HTML5的文件上传类设计[J].电脑知识与技术,2015(2):1009-3044.
    [3]王莉敏.基于HTML5大文件断点续传的实现方案[J].计算机与现代化, 2016(3):1006-2475.
    [4] Joker_Ye. HTML5实现图片压缩上传功能[EB/OL]. https://blog.csdn.net/hj7jay/article/details/51003926.

© 2004-2018 中国地质图书馆版权所有 京ICP备05064691号 京公网安备11010802017129号

地址:北京市海淀区学院路29号 邮编:100083

电话:办公室:(+86 10)66554848;文献借阅、咨询服务、科技查新:66554700