Unlock instant, AI-driven research and patent intelligence for your innovation.

File uploading method and device based on JavaScript

A file upload and file technology, applied in the computer field, can solve the problems of increasing user waiting time, inconvenient use, waste of broadband, etc., and achieve the effect of saving bandwidth, saving time, and high security

Inactive Publication Date: 2017-12-01
北京天信瑞安信息技术有限公司
View PDF4 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] Client-based instant transmission needs to download a specific client, which is inconvenient to use
Browser-based file upload technology always needs to upload complete file content, which often has the disadvantages of wasting traffic, wasting bandwidth, and increasing user waiting time

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • File uploading method and device based on JavaScript
  • File uploading method and device based on JavaScript
  • File uploading method and device based on JavaScript

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0040] The present invention provides a JavaScript-based file uploading method, which requires the cooperation of a file server and a Web page for the implementation of browser-based second transfer. When a user uploads a file using a browser, the file server divides the file into blocks of fixed size, and calculates and saves the file fingerprint of each block. If the file has been uploaded before, there is no need to upload it again, and the upload is completed immediately, which can save the time for the browser to upload the file and save the bandwidth.

[0041] like figure 1 As shown, it is a flow chart of a JavaScript file upload technology of the present invention, and the specific implementation steps of the present invention are as follows:

[0042] Step S1 Select the file to be uploaded

[0043] The user opens the upload page in the browser, selects the file to be uploaded in the corresponding folder, and clicks upload.

[0044] Step S2: Block the file by JavaScri...

Embodiment 2

[0066] Based on the same inventive concept, the present invention also provides a JavaScript-based file uploading device, such as figure 2 As shown, it is a system block diagram of the apparatus of the present invention. The uploading device includes: an uploading unit 1 , a block unit 2 , a computing unit 3 , and a verification unit 4 .

[0067] The uploading unit 1 is used to select files to be uploaded. The user opens the upload interface in the browser, selects the file to be uploaded in the corresponding folder, and clicks upload.

[0068] The chunking unit 2 chunks the uploaded file through JavaScript. Use JavaScriptFileReader to read the file content in blocks. The core idea of ​​the block is: take the size of 100Mb as an example, block the file larger than 100Mb, otherwise read the whole block.

[0069] Selecting an appropriate file block size is extremely important for the file uploading work. If the block size is too large or too small, the upload efficiency will...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a file uploading method based on JavaScript. The method comprises the following steps: selecting a file needing to upload; blocking the file through the JavaScript; computing and saving the file fingerprint, wherein the blocking method can satisfy the requirement o execution speed, information angle, memory consumption, stability and like multiple aspects; the program is run when the file needs to upload every time, the most suitable blocking size is automatically computed, and the blocking is implemented; the computing method adopts the Hash algorithm of the SHA-x series, wherein the Hash algorithm takes the security and the stability into consideration. The method disclosed by the invention is implemented based on the browser second-uploading technology, the cooperation of a file server and the Web page is required; when the user uses the browser t upload the file, if the file has been uploaded before, the re-uploading is unnecessary, the uploading is immediately finished, the file uploading time in the browse is saved, and the broadband is saved.

Description

technical field [0001] The present invention relates to the field of computer technology, in particular to a JavaScript-based file uploading method and device. Background technique [0002] Uploading files from a browser is a commonly used function, and there are three main implementations at present: 1. Flash-based upload; 2. Browser form-based upload; 3. Stream-based upload. All the above three implementations need to upload all the file contents to the server. "Second upload" is a common "ignored" upload method on network disks. It is an existing optimization method based on client-side file upload. The principle is: if the file already exists on the server, it cannot be uploaded again. Upload the complete file content. [0003] Client-based second-pass requires downloading a specific client, which is inconvenient to use. The browser-based file upload technology always needs to upload the complete file content, which often has the disadvantages of wasting traffic, wast...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): H04L29/08G06F17/30
CPCG06F16/137G06F16/152H04L67/06
Inventor 张乃文
Owner 北京天信瑞安信息技术有限公司