File transmission method and device

A file transfer and file upload technology, applied in the Internet field, can solve the problems of low fragmentation processing efficiency and high fragmentation processing cost, and achieve the effect of reducing fragmentation processing cost, avoiding instability problems, and improving efficiency.

Inactive Publication Date: 2016-04-06
BAIDU ONLINE NETWORK TECH (BEIJIBG) CO LTD
View PDF2 Cites 24 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, the use of plug-ins or edited codes to implement file fragmentation processing results in hig

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 transmission method and device
  • File transmission method and device
  • File transmission method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0046] The embodiment of the present invention provides a file transfer method, please refer to figure 1 , which is a schematic flowchart of Embodiment 1 of the file transfer method provided by the embodiment of the present invention. As shown in the figure, the method includes the following steps:

[0047] S101. During the running process of the browser, call the file operation interface provided by the browser to access the file.

[0048] Specifically, the JavaScript engine in the browser pre-writes the file operation interface provided by the browser. In this way, during the running of the browser, the JavaScript engine can call the file operation interface according to the file selected by the user on the browser. file to access.

[0049] In a specific implementation process, the file operation interface may be an HTML5-based file operation application programming interface (Application Programming Interface, API), such as HTMLFileAPI.

[0050] S102. Obtain a file segmen...

Embodiment 2

[0058] Based on the file transfer method provided in the first embodiment above, this embodiment provides a specific implementation manner of the file transfer method. Please refer to figure 2 , which is a schematic flowchart of Embodiment 2 of the file transfer method provided by the embodiment of the present invention. As shown in the figure, the file transfer method may include the following steps:

[0059] S201. Send a second file upload request to the server, where the second file upload request carries the identifier of the file, so that the server can detect whether there is a previously uploaded file in the file according to the identifier of the file Fragment, if there is no file fragment that has been uploaded, return a status code indicating that the file has not been uploaded.

[0060] Specifically, before sending the file fragment to the server, the JavaScript engine first sends a second file upload request to the server, and the second file upload request carri...

Embodiment 3

[0070] Based on the file transfer method provided in the first embodiment above, this embodiment provides another specific implementation manner of the file transfer method. Please refer to image 3 , which is a schematic flowchart of Embodiment 3 of the file transfer method provided by the embodiment of the present invention. As shown in the figure, the file transfer method may include the following steps:

[0071] S301. Send a third file upload request to the server, where the third file upload request carries the identifier of the file, so that the server can detect whether there is a previously uploaded file in the file according to the identifier of the file Fragment, if there is a file fragment that has been uploaded, return the identifier of the file fragment that has been uploaded.

[0072] Specifically, before sending the file fragment to the server, the JavaScript engine first sends a third file upload request to the server, and the third file upload request carries...

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

Embodiments of the invention provide a file transmission method and device. On one hand, according to the file transmission method and device provided by the embodiments of the invention, in an operation process of a browser, a file operation interface provided by the browser is dispatched to access a file to obtain a file fragment from the file, then a first file uploading request is sent to a server, wherein the first file uploading request carries the file fragment, a fragment serial number and an identifier of the filer, so that the server stores the file fragment according to the file fragment, the fragment serial number and the identifier of the filer. Therefore, by adopting the file transmission method and device in the technical scheme provided by the embodiments of the invention, the fragment processing cost of the file is reduced, and the fragment processing efficiency of the file is improved.

Description

【Technical field】 [0001] The invention relates to the technical field of the Internet, in particular to a file transmission method and device. 【Background technique】 [0002] With the development of Internet technology, there are more and more interactions between websites and browsers, from initial form submission to asynchronous script and Extensible Markup Language (AJAX) interaction, from simple control of document object model tree by using script The elements in the canvas can be used to present various complex two-dimensional or three-dimensional graphics on the page. However, the file upload technology based on HyperText Markup Language (HyperTextMarkupLanguage, HTML) has not developed much. File upload can satisfy the upload of smaller files, but for the upload of larger files, the file upload often fails due to network instability. . [0003] In the prior art, in order to solve the problem of uploading large files, a plug-in is installed in the browser or a code ...

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
IPC IPC(8): H04L29/08
CPCH04L67/06
Inventor 高圣巍
Owner BAIDU ONLINE NETWORK TECH (BEIJIBG) CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products