CN104092741A - Method for processing uploading of multiple-instance large files based on browser - Google Patents

Method for processing uploading of multiple-instance large files based on browser Download PDF

Info

Publication number
CN104092741A
CN104092741A CN201410298288.5A CN201410298288A CN104092741A CN 104092741 A CN104092741 A CN 104092741A CN 201410298288 A CN201410298288 A CN 201410298288A CN 104092741 A CN104092741 A CN 104092741A
Authority
CN
China
Prior art keywords
file
request
uploading
server
browser
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201410298288.5A
Other languages
Chinese (zh)
Inventor
王征平
黄平
韩腾飞
陈杰
蔡博丁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
HUBEI ANBIAO INFORMATION TECHNOLOGY Co Ltd
Original Assignee
HUBEI ANBIAO INFORMATION TECHNOLOGY Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by HUBEI ANBIAO INFORMATION TECHNOLOGY Co Ltd filed Critical HUBEI ANBIAO INFORMATION TECHNOLOGY Co Ltd
Priority to CN201410298288.5A priority Critical patent/CN104092741A/en
Publication of CN104092741A publication Critical patent/CN104092741A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Transfer Between Computers (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to the technical field of networks, in particular to a method for processing uploading of multiple-instance large files based on a browser. The method for processing uploading of the multiple-instance large files based on the browser is characterized by comprising the steps that (1) files are selected and stored in a request queue; (2) the files in the request queue sequentially sends uploading requests to a server; (3) after the server receives uploading request messages, the file sizes are acquired first; (4) a server end reads binary stream data, a binary stream is divided into multiple blocks according to the writing size at each time, and each binary stream server writs while reads; (5) after the uploading requests in the request queue are sent successfully, a browser end acquires the uploading progress and displays the uploading progress on a webpage; (6) after the browser end receives a successful processing result, the next file in the request queue uploads the request. According to the method for processing uploading of the multiple-instance large files based on the browser, the browser end is used for controlling concurrent request numbers, the method for reading and writing the files of the server is changed, and therefore the uploading concurrent processing capacity of the server is improved.

Description

A kind of processing method of the many examples big file uploading based on browser
Technical field
The present invention relates to networking technology area, relate in particular to a kind of processing method of the many examples big file uploading based on browser.
Background technology
File based on browser is uploaded, and is the function that great majority all possess based on browser program.First, the file size of uploading based on browser can be subject to the restriction of server free memory.When particularly concurrent, if there is the upload file simultaneously of too much process, can cause server end low memory.In addition, user cannot see the progress of uploading in real time, causes user to experience poor.
Summary of the invention
The object of the invention is to overcome the shortcoming of prior art, a kind of processing method of the many examples big file uploading based on browser is provided.
For solving above technical problem, technical scheme of the present invention is: a kind of processing method of the many examples big file uploading based on browser, and its difference is, its step comprises:
1) during user's select File, for the browser of not supporting HTML5 language, once can only select a file, select a file to preserve a upload request in request queue; For the browser of supporting HTML5 language, once can select a plurality of files, at this moment successively the file of selection is saved in request queue;
2) file in request queue sends upload request to service successively, and request header can comprise a document size information; When a file, upload, other upload request can be in wait state;
3) server receives after upload request message, first obtains file size; When file size surpasses server end setting upload size limits, the mistake that server backspace file is excessive, client, to returning after mistake, can be carried out next file upload request; For not surpassing the request of size restriction, service end can be opened interface channel, receives upload file binary stream data;
4) service end reads binary stream data, according to the large young pathbreaker's binary stream that writes of setting at every turn, is divided into polylith, and every binary stream server writes while reading, and upgrades the progress of the uploading variable of service end simultaneously; It is complete that every binary stream data write, and discharges the current server memory taking;
5), after the upload request in request queue sends successfully, browser end starts the progress of the uploading variable of each one second request service end; Obtain after the progress of uploading, on the page, show;
6) file upload request is after server process, and server returns successfully.View side receives after successful result, starts next file upload request in request queue.
Contrast prior art, beneficial features of the present invention is: by browser end, control concurrent request number, and change the method that server reads and writes file, thereby reach server to uploading the lifting of concurrent processing ability.Meanwhile, reading in real time the progress of uploading can experience for user provides good user.
Accompanying drawing explanation
Fig. 1 is the theory diagram of the embodiment of the present invention.
Embodiment
Below by embodiment, by reference to the accompanying drawings the present invention is described in further detail.
Please refer to Fig. 1, the present invention is based on the processing method of many examples big file uploading of browser, its step comprises:
1) during user's select File, for the browser of not supporting HTML5 language, once can only select a file, select a file to preserve a upload request in request queue; For the browser of supporting HTML5 language, once can select a plurality of files, at this moment successively the file of selection is saved in request queue;
2) file in request queue sends upload request to service successively, and request header can comprise a document size information; When a file, upload, other upload request can be in wait state;
3) server receives after upload request message, first obtains file size; When file size surpasses server end setting upload size limits, the mistake that server backspace file is excessive, client, to returning after mistake, can be carried out next file upload request; For not surpassing the request of size restriction, service end can be opened interface channel, receives upload file binary stream data;
4) service end reads binary stream data, according to the large young pathbreaker's binary stream that writes of setting at every turn, is divided into polylith, and every binary stream server writes while reading, and upgrades the progress of the uploading variable of service end simultaneously; It is complete that every binary stream data write, and discharges the current server memory taking;
5), after the upload request in request queue sends successfully, browser end starts the progress of the uploading variable of each one second request service end; Obtain after the progress of uploading, on the page, show;
6) file upload request is after server process, and server returns successfully.View side receives after successful result, starts next file upload request in request queue.
At traditional file, upload in mode, during file upload request that server receives, whole file can be read in internal memory, and then write disk.Therefore, each uploads the internal memory that process can at least take institute's upload file size, so that this can cause server can receive the process concurrent number that file uploads is very little.Therefore the present invention controls concurrent request number by browser end, at browser end, a plurality of files of selecting is sorted and queue processing, guarantee that one of a browser end only triggers a upload request, and then concurrent number is uploaded in minimizing to a certain degree; And change the method that server reads and writes file, thereby reach server to uploading the lifting of concurrent processing ability.
For each different process of uploading, server need to be preserved the file writing progress of each process, and browser end just can carry out inquiry progress by the sign of each process like this, reads in real time the progress of uploading and can experience for user provides good user.
Above content is in conjunction with concrete execution mode further description made for the present invention, can not assert that specific embodiment of the invention is confined to these explanations.For general technical staff of the technical field of the invention, without departing from the inventive concept of the premise, can also make some simple deduction or replace, all should be considered as belonging to protection scope of the present invention.

Claims (1)

1. a processing method for the big file uploading of the many examples based on browser, is characterized in that, its step comprises:
1) during user's select File, for the browser of not supporting HTML5 language, once can only select a file, select a file to preserve a upload request in request queue; For the browser of supporting HTML5 language, once can select a plurality of files, at this moment successively the file of selection is saved in request queue;
2) file in request queue sends upload request to service successively, and request header can comprise a document size information; When a file, upload, other upload request can be in wait state;
3) server receives after upload request message, first obtains file size; When file size surpasses server end setting upload size limits, the mistake that server backspace file is excessive, client, to returning after mistake, can be carried out next file upload request; For not surpassing the request of size restriction, service end can be opened interface channel, receives upload file binary stream data;
4) service end reads binary stream data, according to the large young pathbreaker's binary stream that writes of setting at every turn, is divided into polylith, and every binary stream server writes while reading, and upgrades the progress of the uploading variable of service end simultaneously; It is complete that every binary stream data write, and discharges the current server memory taking;
5), after the upload request in request queue sends successfully, browser end starts the progress of the uploading variable of each one second request service end; Obtain after the progress of uploading, on the page, show;
6) file upload request is after server process, and server returns successfully.View side receives after successful result, starts next file upload request in request queue.
CN201410298288.5A 2014-06-26 2014-06-26 Method for processing uploading of multiple-instance large files based on browser Pending CN104092741A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410298288.5A CN104092741A (en) 2014-06-26 2014-06-26 Method for processing uploading of multiple-instance large files based on browser

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410298288.5A CN104092741A (en) 2014-06-26 2014-06-26 Method for processing uploading of multiple-instance large files based on browser

Publications (1)

Publication Number Publication Date
CN104092741A true CN104092741A (en) 2014-10-08

Family

ID=51640421

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410298288.5A Pending CN104092741A (en) 2014-06-26 2014-06-26 Method for processing uploading of multiple-instance large files based on browser

Country Status (1)

Country Link
CN (1) CN104092741A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106603603A (en) * 2015-10-16 2017-04-26 北大方正集团有限公司 HTML 5 browser supported asynchronous uploading method and system for multiple files
CN109375968A (en) * 2018-08-28 2019-02-22 苏州浪潮智能软件有限公司 A kind of file uploading method that can graphically interact

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101567903A (en) * 2009-05-11 2009-10-28 北京中企开源信息技术有限公司 Method for uploading file and system based on Ajax technology
CN101662484A (en) * 2008-08-28 2010-03-03 中国科学院声学研究所 Method for uploading file of RFC1867 specification based HTTP protocol
CN102111301A (en) * 2011-03-28 2011-06-29 上海云高软件科技有限公司 General file transmission system and implementation method thereof
CN102611757A (en) * 2012-03-27 2012-07-25 上海市电力公司 Multi-file uploading system based on B/S (browser/server) framework
CN103269339A (en) * 2013-05-03 2013-08-28 武汉噢易科技有限公司 File transmission method and system based on hypertext transfer protocol
CN103685413A (en) * 2012-09-19 2014-03-26 腾讯科技(深圳)有限公司 File uploading method and system
CN103795809A (en) * 2014-03-03 2014-05-14 深圳市华曦达科技股份有限公司 File uploading method and system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101662484A (en) * 2008-08-28 2010-03-03 中国科学院声学研究所 Method for uploading file of RFC1867 specification based HTTP protocol
CN101567903A (en) * 2009-05-11 2009-10-28 北京中企开源信息技术有限公司 Method for uploading file and system based on Ajax technology
CN102111301A (en) * 2011-03-28 2011-06-29 上海云高软件科技有限公司 General file transmission system and implementation method thereof
CN102611757A (en) * 2012-03-27 2012-07-25 上海市电力公司 Multi-file uploading system based on B/S (browser/server) framework
CN103685413A (en) * 2012-09-19 2014-03-26 腾讯科技(深圳)有限公司 File uploading method and system
CN103269339A (en) * 2013-05-03 2013-08-28 武汉噢易科技有限公司 File transmission method and system based on hypertext transfer protocol
CN103795809A (en) * 2014-03-03 2014-05-14 深圳市华曦达科技股份有限公司 File uploading method and system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106603603A (en) * 2015-10-16 2017-04-26 北大方正集团有限公司 HTML 5 browser supported asynchronous uploading method and system for multiple files
CN109375968A (en) * 2018-08-28 2019-02-22 苏州浪潮智能软件有限公司 A kind of file uploading method that can graphically interact

Similar Documents

Publication Publication Date Title
US20190356717A1 (en) Multimedia file processing
US9715532B1 (en) Systems and methods for content object optimization
US20180011913A1 (en) Data replication management
AU2016369238A1 (en) Synchronizing snapshots between storage systems
US8984027B1 (en) Systems and methods for migrating files to tiered storage systems
JP5957634B2 (en) Ordering multiple write commands associated with a storage device
JP2015513386A5 (en)
US20130198464A1 (en) Efficient read and write operations
US20160034387A1 (en) Controlling wear among flash memory devices based on remaining warranty
CN103365977A (en) Storage processing method and device for data on nonvolatile storage medium
Gramazio et al. Authoring robotic processes
CN104408047A (en) Method for uploading text file to HDFS (hadoop distributed file system) in multi-machine parallel mode based on NFS (network file system) file server
US20160380953A1 (en) Smart feed system
CN104391961A (en) Tens of millions of small file data read and write solution strategy
CN104092741A (en) Method for processing uploading of multiple-instance large files based on browser
CN104125135A (en) Instant messaging application chatting record management method and terminal thereof
US10298974B2 (en) Method and device for presenting content data from network
JP6507263B2 (en) Content filtering based on user mobile network and data plan
CN103747296A (en) Video playing method and system
US9424269B1 (en) Systems and methods for deduplicating archive objects
US9442940B1 (en) Systems and methods for adaptively selecting file-recall modes
US20150277768A1 (en) Relocating data between storage arrays
US10474365B2 (en) System and method for file processing from a block device
TWI507975B (en) Storage device with multiple threshold and its method
US20170163555A1 (en) Video file buffering method and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20141008

RJ01 Rejection of invention patent application after publication