CN104468843A - File uploading method and device - Google Patents

File uploading method and device Download PDF

Info

Publication number
CN104468843A
CN104468843A CN201410851909.8A CN201410851909A CN104468843A CN 104468843 A CN104468843 A CN 104468843A CN 201410851909 A CN201410851909 A CN 201410851909A CN 104468843 A CN104468843 A CN 104468843A
Authority
CN
China
Prior art keywords
files
blocks
file destination
numbering
web server
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
CN201410851909.8A
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.)
Inspur Software Co Ltd
Original Assignee
Inspur Software 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 Inspur Software Co Ltd filed Critical Inspur Software Co Ltd
Priority to CN201410851909.8A priority Critical patent/CN104468843A/en
Publication of CN104468843A publication Critical patent/CN104468843A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention provides a file uploading method and device. A plug-in of a browser is installed on a terminal device to serve as a client terminal. The method includes the steps that the client terminal obtains file information of a to-be-uploaded target file; the obtained file information of the target file is uploaded to a Web server through the libcurl technology in a virtual html form mode so that the Web server can return and store identification information of the target file; the target file is divided into one or more file blocks, wherein the file blocks carry serial numbers, the file information and the identification information; according to the sorting sequence of the serial numbers of the file blocks, the file blocks are sequentially uploaded to the Web server to enable the Web server to verify the loaded file blocks according to stored information, downloading information of the file blocks is sequentially returned, and the successfully-downloaded file blocks are merged through the Web server. According to the scheme, the file transmission efficiency is improved.

Description

A kind of file uploading method and device
Technical field
The present invention relates to Internet technical field, particularly a kind of file uploading method and device.
Background technology
Along with the fast development of Internet technology, internet, applications is more and more abundanter.In Web application system, for specific application scenarios, need client file to upload onto the server.
At present, the mode of files passe is: use an application (HTML under standard generalized markup language, Hyper Text Mark-up Language) file control in list uploads, and this mode only supports the files passe that length is less, and upper transfer efficiency is lower.
Summary of the invention
The invention provides a kind of file uploading method and device, only support to solve prior art the files passe that length is less, and upper transfer efficiency is lower.
The invention provides a kind of file uploading method, the plug-in unit installing browser on the terminal device, as client, comprising:
Client obtains the fileinfo of file destination to be uploaded;
Adopt libcurl technology that the fileinfo of the described file destination obtained is uploaded to Web server with virtual html sheet format, with the identification information making Web server return described file destination, and store described fileinfo and described identification information;
According to the data length preset, described file destination is divided into more than one blocks of files, each blocks of files carries from putting in order corresponding numbering, described fileinfo and described identification information in described file destination;
According to putting in order of the numbering of each blocks of files, utilize files passe thread that the blocks of files in described file destination is uploaded to Web server successively, the blocks of files that each is downloaded is verified according to the information stored to make Web server, and return the Download Info of this blocks of files successively, and Web server is merged to the successful blocks of files of download.
Preferably, when getting described file destination and uploading unsuccessfully, comprise further:
Send obtaining information to Web server, described obtaining information finally downloads the numbering of successful blocks of files for obtaining Web server;
According to this final numbering obtained, from the blocks of files that the next one numbering of numbering final described in described file destination is corresponding, described file destination is uploaded to Web server.
Present invention also offers a kind of file uploading method, the plug-in unit installing browser on the terminal device, as client, comprising:
Obtain the fileinfo of the file destination to be uploaded that client adopts libcurl technology to send with virtual html sheet format;
According to described fileinfo, generate the identification information of described file destination, and generate temp directory according to described fileinfo and described identification information, by described fileinfo and described identification information storage in a database;
Described identification information is sent to client, to make client putting in order according to the numbering of each blocks of files in described file destination, when the blocks of files of described file destination is uploaded to Web server successively, described fileinfo and described identification information are added in each blocks of files;
Download each blocks of files of described file destination, the information according to storing is verified the blocks of files that each is downloaded, and returns the Download Info of this blocks of files successively;
The blocks of files be verified is stored in described temp directory, and each blocks of files stored in described temp directory is merged.
Preferably, comprise further: the numbering of the blocks of files be verified is stored in log file;
After the described information according to storing is verified the blocks of files that each is downloaded, comprise further: when the described Download Info returning this blocks of files is successively this blocks of files failed download, receive the obtaining information that client sends, described obtaining information is for obtaining the numbering that self finally downloads successful blocks of files; In described log file, obtain the numbering that self finally downloads successful blocks of files, and described numbering is finally sent to client, continue to upload described file destination according to described numbering finally to make client; Downloading from the blocks of files corresponding to the next one of described numbering is finally numbered, in the described information according to storing, the blocks of files that each is downloaded being verified described in performing.
Present invention also offers a kind of client, comprising:
Installation unit, for installing the plug-in unit of browser on the terminal device as client;
Acquiring unit, for obtaining the fileinfo of file destination to be uploaded;
Files passe unit, for adopting libcurl technology, the fileinfo of the described file destination obtained is uploaded to Web server with virtual html sheet format, with the identification information making Web server return described file destination, and store described fileinfo and described identification information;
Division unit, for according to the data length preset, is divided into more than one blocks of files by described file destination, and each blocks of files carries from putting in order corresponding numbering, described fileinfo and described identification information in described file destination;
Download Info returns unit, for putting in order of the numbering according to each blocks of files, utilize files passe thread that the blocks of files in described file destination is uploaded to Web server successively, the blocks of files that each is downloaded is verified according to the information stored to make Web server, and return the Download Info of this blocks of files successively, and Web server is merged to the successful blocks of files of download.
Preferably, comprise further:
Transmitting element, for sending obtaining information to Web server, described obtaining information finally downloads the numbering of successful blocks of files for obtaining Web server;
Described files passe unit, for according to this final numbering obtained, from the blocks of files that the next one numbering of numbering final described in described file destination is corresponding, is uploaded to Web server by described file destination.
Present invention also offers a kind of Web server, comprising:
Installation unit, for installing the plug-in unit of browser on the terminal device as client;
Acquiring unit, for obtaining the fileinfo of the file destination to be uploaded that client adopts libcurl technology to send with virtual html sheet format;
Generation unit, for according to described fileinfo, generates the identification information of described file destination, and generates temp directory according to described fileinfo and described identification information, by described fileinfo and described identification information storage in a database;
Transmitting element, for described identification information is sent to client, to make client putting in order according to the numbering of each blocks of files in described file destination, when the blocks of files of described file destination is uploaded to Web server successively, described fileinfo and described identification information are added in each blocks of files;
Download authentication unit, for downloading each blocks of files of described file destination, the information according to storing is verified the blocks of files that each is downloaded, and returns the Download Info of this blocks of files successively;
Merge cells, for the blocks of files be verified being stored in described temp directory, and merges each blocks of files stored in described temp directory.
Preferably, comprise further: memory cell, for the numbering of the blocks of files be verified is stored in log file;
Resume unit, for when the described Download Info returning this blocks of files is successively this blocks of files failed download, receive the obtaining information that client sends, described obtaining information is for obtaining the numbering that self finally downloads successful blocks of files; In described log file, obtain the numbering that self finally downloads successful blocks of files, and described numbering is finally sent to client, continue to upload described file destination according to described numbering finally to make client; Download from the blocks of files corresponding to the next one of described numbering is finally numbered, and the blocks of files of download sent to described download authentication unit to verify.
Embodiments provide a kind of file uploading method and device, by installing browser plug-in on the terminal device as client, upload by carrying out piecemeal to file destination to be uploaded, make to upload successful blocks of files at Web server to each to merge, improve the efficiency of transmission of file.
Accompanying drawing explanation
Fig. 1 is the method flow diagram that the embodiment of the present invention provides;
Fig. 2 is the method flow diagram that another embodiment of the present invention provides;
Fig. 3 is the method flow diagram that further embodiment of this invention provides;
Fig. 4 is the file destination schematic diagram that the embodiment of the present invention provides;
Fig. 5 is the client place configuration diagram that the embodiment of the present invention provides;
Fig. 6 is the client terminal structure schematic diagram that the embodiment of the present invention provides;
Fig. 7 is the client terminal structure schematic diagram that another embodiment of the present invention provides;
Fig. 8 is the Web server place configuration diagram that the embodiment of the present invention provides;
Fig. 9 is the Web server structural representation that the embodiment of the present invention provides;
Figure 10 is the Web server structural representation that another embodiment of the present invention provides.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described.Obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
As shown in Figure 1, embodiments provide a kind of file uploading method, install the plug-in unit of browser on the terminal device as client, the method can comprise the following steps:
Step 101: client obtains the fileinfo of file destination to be uploaded.
Step 102: adopt libcurl technology that the fileinfo of the described file destination obtained is uploaded to Web server with virtual html sheet format, with the identification information making Web server return described file destination, and store described fileinfo and described identification information.
Step 103: according to the data length preset, described file destination is divided into more than one blocks of files, each blocks of files carries from putting in order corresponding numbering, described fileinfo and described identification information in described file destination.
Step 104: according to putting in order of the numbering of each blocks of files, utilize files passe thread that the blocks of files in described file destination is uploaded to Web server successively, the blocks of files that each is downloaded is verified according to the information stored to make Web server, and return the Download Info of this blocks of files successively, and Web server is merged to the successful blocks of files of download.
According to such scheme, by installing browser plug-in on the terminal device as client, uploading by carrying out piecemeal to file destination to be uploaded, making, at Web server, successful blocks of files is uploaded to each and merging, improve the efficiency of transmission of file.
As shown in Figure 2, embodiments provide a kind of file uploading method, install the plug-in unit of browser on the terminal device as client, the method can comprise the following steps:
Step 201: the fileinfo obtaining the file destination to be uploaded that client adopts libcurl technology to send with virtual html sheet format.
Step 202: according to described fileinfo, generates the identification information of described file destination, and generates temp directory according to described fileinfo and described identification information, by described fileinfo and described identification information storage in a database.
Step 203: described identification information is sent to client, to make client putting in order according to the numbering of each blocks of files in described file destination, when the blocks of files of described file destination is uploaded to Web server successively, described fileinfo and described identification information are added in each blocks of files.
Step 204: each blocks of files downloading described file destination, the information according to storing is verified the blocks of files that each is downloaded, and returns the Download Info of this blocks of files successively.
Step 205: the blocks of files be verified is stored in described temp directory, and each blocks of files stored in described temp directory is merged.
According to such scheme, by installing browser plug-in on the terminal device as client, uploading by carrying out piecemeal to file destination to be uploaded, making, at Web server, successful blocks of files is uploaded to each and merging, improve the efficiency of transmission of file.
For making the object, technical solutions and advantages of the present invention clearly, below in conjunction with drawings and the specific embodiments, the present invention is described in further detail.
As shown in Figure 3, embodiments provide a kind of file uploading method, the method can comprise the following steps:
Step 301: the operating system environment determining present terminal equipment, is arranged on the browser plug-in being compatible with this operating system environment on present terminal equipment, using this browser plug-in as client.
In the present embodiment, browser plug-in can be plug-in unit, by using Qt browser plug-in technology to realize, makes plug-in unit that the powerful class libraries of Qt can be utilized to realize self function.And use this Qt browser plug-in, make the present embodiment have platform compatibility, the hardware platform of various varying environment can be supported, there is good professional platform independence.
Step 302: client determines file destination to be uploaded, and obtain the fileinfo of file destination.
In the present embodiment, fileinfo comprises: file destination title, file destination cryptographic Hash.
Wherein, file destination to be uploaded can be a file, also can be multiple file.
Step 303: client adopts libcurl technology that the fileinfo of the file destination of acquisition is uploaded to Web server with virtual html sheet format.
Wherein, libcurl technology allows to use different agreements connect and link up different servers.
Because the scheme of prior art is utilizing list when fileinfo is uploaded to Web server, need user to fill in the username and password logging in Web server, expend time in.Therefore the present embodiment adopts libcurl technology, and before fileinfo is uploaded to Web server, the username and password that Auto-writing logs in Web server is submitted to.By utilizing libcurl technology to improve versatility, background process can support numerous Web server types.
The fileinfo of the file destination that step 304:Web server receives client is uploaded, according to identification information and the temp directory of this fileinfo generating object file, stores this fileinfo and identification information.
Wherein, the identification information that Web server generates is the unique identifier for identifying file destination, and this identification information can be letter, number combinatorics on words, is preset by user.
In the present embodiment, the temp directory of generation may be used for the blocks of files of follow-up storage file destination.
The identification information of file destination is sent to client by step 305:Web server.
Step 306: client receives the identification information that Web server sends, and according to the data length preset, file destination is divided into more than one blocks of files, and be numbered for each blocks of files.
Wherein, the size of the blocks of files of division is set by user, does not do concrete restriction at this present embodiment.
In the present embodiment, consider the breakpoint transmission of file destination in subsequent process, according to the sequencing of blocks of files in file destination, each blocks of files after dividing is numbered.
As shown in Figure 4, for each blocks of files schematic diagram of the file destination A division that the present embodiment provides, wherein, client with the order from file header to end-of-file file destination A is divided into 10 blocks of files: A1, A2, A3 ..., A8, A9 and A10, and the numbering of these 10 blocks of files is respectively: 001,002,003 ..., 008,009 and 010.
Step 307: client is according to the numbering of each blocks of files putting in order in file destination from file header to end-of-file, and startup file is uploaded thread and the blocks of files of file destination is uploaded to Web server successively.
In the present embodiment, if file destination is multiple files, so need to start corresponding files passe thread according to file destination number.
Wherein, each blocks of files of client upload all carries the fileinfo of file destination and the identification information of file destination, and carries the cryptographic Hash of blocks of files self.
Step 308: according to the order in the file destination uploaded from file header to end-of-file, the blocks of files of the file destination uploaded downloaded by Web server.
Step 309:Web server is verified the blocks of files that each is downloaded according to the information self stored, and returns the Download Info of this blocks of files successively, if the Download Info returned is the notice be verified, performs step 310; If the Download Info returned is the notice of authentication failed, perform step 311.
In the present embodiment, the blocks of files that each is downloaded is verified, file destination title and file destination cryptographic Hash in the fileinfo according to the file destination preserved in advance, whether file name and cryptographic Hash and self of the fileinfo that authenticating documents block carries are preserved identical, if identical, show to be verified, otherwise checking is not passed through.Adopt cryptographic Hash to verify each blocks of files uploaded in the present embodiment, ensure that the correctness that file destination is uploaded.
Wherein, the reason that blocks of files uploads failure can comprise: one or more in files passe process in upload procedure termination, manual termination files passe process, network interruption or power interruptions.
Step 310: the blocks of files be verified is stored in temp directory, and the numbering of each blocks of files is stored in catalogue file, and each blocks of files stored in temp directory is merged, terminate.
In the present embodiment, Web server can according to the numbering of each blocks of files of preserving in temp directory, be a whole file according to the order from file header to end-of-file by All Files merged block, and the file after merging is stored to server end upload catalogue, and according to the state of uploading of this file destination in server-side database for uploading end.
The present embodiment uploads file destination to Web server by piecemeal, uploads successfully at All Files block, and merging at Web server end becomes complete object file, improves the efficiency of transmission of file destination.
After each blocks of files is merged into complete file destination, the file destination after being combined carries out MD5 checking.
Step 311: send obtaining information to Web server, described obtaining information finally downloads the numbering of successful blocks of files and the fileinfo of file destination and identification information for obtaining Web server.
Step 312:Web server determines the numbering finally downloading successful blocks of files in log file, and the numbering final by this and the fileinfo of file destination and identification information send to client.
In the present embodiment, the mode finally downloading the numbering of successful blocks of files determined by this Web server, can determine the numbering that number value is maximum, numbering maximum for this number value is sent to client in log file.
Step 313: file destination, according to this final numbering, the blocks of files that the next one numbering of this final numbering is corresponding from file destination, is uploaded to Web server, performs step 309 by client.
In the present embodiment, if Web server determine that this finally downloads successful blocks of files be numbered 003, so client resumes from the blocks of files being numbered 004.Utilize this numbering to distinguish the blocks of files of failed download, file destination is resumed after breakpoint, and what meet Web application system file uploads demand.
In the present embodiment, if this blocks of files uploading failure is after continuing to upload preset times, still fails to upload successfully, then determine to upload failure.
According to this programme, by installing browser plug-in on the terminal device as client, uploading by carrying out piecemeal to file destination to be uploaded, making, at Web server, successful blocks of files is uploaded to each and merging, improve the efficiency of transmission of file.
As shown in Figure 5, Figure 6, a kind of client is embodiments provided.Device embodiment can pass through software simulating, also can be realized by the mode of hardware or software and hardware combining.Say from hardware view; as shown in Figure 5; for a kind of hardware structure diagram of embodiment of the present invention client place equipment; except the processor shown in Fig. 5, internal memory, network interface and nonvolatile memory; in embodiment, the equipment at device place can also comprise other hardware usually, as the forwarding chip etc. of responsible process message.For software simulating, as shown in Figure 6, as the device on a logical meaning, be by the CPU of its place equipment, computer program instructions corresponding in nonvolatile memory is read operation in internal memory to be formed.The client 60 that the present embodiment provides comprises:
Installation unit 601, for installing the plug-in unit of browser on the terminal device as client;
Acquiring unit 602, for obtaining the fileinfo of file destination to be uploaded;
Files passe unit 603, for adopting libcurl technology, the fileinfo of the described file destination obtained is uploaded to Web server with virtual html sheet format, with the identification information making Web server return described file destination, and store described fileinfo and described identification information;
Division unit 604, for the data length that basis is preset, described file destination is divided into more than one blocks of files, and each blocks of files carries from putting in order corresponding numbering, described fileinfo and described identification information in described file destination;
Download Info returns unit 605, for putting in order of the numbering according to each blocks of files, utilize files passe thread that the blocks of files in described file destination is uploaded to Web server successively, the blocks of files that each is downloaded is verified according to the information stored to make Web server, and return the Download Info of this blocks of files successively, and Web server is merged to the successful blocks of files of download.
In an embodiment of the invention, as shown in Figure 7, client may further include:
Transmitting element 701, for sending obtaining information to Web server, described obtaining information finally downloads the numbering of successful blocks of files for obtaining Web server;
Described files passe unit 603, for according to this final numbering obtained, from the blocks of files that the next one numbering of numbering final described in described file destination is corresponding, is uploaded to Web server by described file destination.
As shown in Figure 8, Figure 9, a kind of Web server is embodiments provided.Device embodiment can pass through software simulating, also can be realized by the mode of hardware or software and hardware combining.Say from hardware view; as shown in Figure 8; for a kind of hardware structure diagram of embodiment of the present invention Web server place equipment; except the processor shown in Fig. 8, internal memory, network interface and nonvolatile memory; in embodiment, the equipment at device place can also comprise other hardware usually, as the forwarding chip etc. of responsible process message.For software simulating, as shown in Figure 9, as the device on a logical meaning, be by the CPU of its place equipment, computer program instructions corresponding in nonvolatile memory is read operation in internal memory to be formed.The Web server 90 that the present embodiment provides comprises:
Installation unit 901, for installing the plug-in unit of browser on the terminal device as client;
Acquiring unit 902, for obtaining the fileinfo of the file destination to be uploaded that client adopts libcurl technology to send with virtual html sheet format;
Generation unit 903, for according to described fileinfo, generates the identification information of described file destination, and generates temp directory according to described fileinfo and described identification information, by described fileinfo and described identification information storage in a database;
Transmitting element 904, for described identification information is sent to client, to make client putting in order according to the numbering of each blocks of files in described file destination, when the blocks of files of described file destination is uploaded to Web server successively, described fileinfo and described identification information are added in each blocks of files;
Download authentication unit 905, for downloading each blocks of files of described file destination, the information according to storing is verified the blocks of files that each is downloaded, and returns the Download Info of this blocks of files successively;
Merge cells 906, for the blocks of files be verified being stored in described temp directory, and merges each blocks of files stored in described temp directory.
In an embodiment of the invention, as shown in Figure 10, client may further include:
Memory cell 1001, for being stored in log file by the numbering of the blocks of files be verified;
Resume unit 1002, for when the described Download Info returning this blocks of files is successively this blocks of files failed download, receive the obtaining information that client sends, described obtaining information is for obtaining the numbering that self finally downloads successful blocks of files; In described log file, obtain the numbering that self finally downloads successful blocks of files, and described numbering is finally sent to client, continue to upload described file destination according to described numbering finally to make client; Download from the blocks of files corresponding to the next one of described numbering is finally numbered, and the blocks of files of download sent to described download authentication unit to verify.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, within the spirit and principles in the present invention all, any amendment made, equivalent replacement, improvement etc., all should be included within the scope of protection of the invention.

Claims (8)

1. a file uploading method, is characterized in that, the plug-in unit installing browser on the terminal device, as client, comprising:
Client obtains the fileinfo of file destination to be uploaded;
Adopt libcurl technology that the fileinfo of the described file destination obtained is uploaded to Web server with virtual html sheet format, with the identification information making Web server return described file destination, and store described fileinfo and described identification information;
According to the data length preset, described file destination is divided into more than one blocks of files, each blocks of files carries from putting in order corresponding numbering, described fileinfo and described identification information in described file destination;
According to putting in order of the numbering of each blocks of files, utilize files passe thread that the blocks of files in described file destination is uploaded to Web server successively, the blocks of files that each is downloaded is verified according to the information stored to make Web server, and return the Download Info of this blocks of files successively, and Web server is merged to the successful blocks of files of download.
2. method according to claim 1, is characterized in that, when getting described file destination and uploading unsuccessfully, comprises further:
Send obtaining information to Web server, described obtaining information finally downloads the numbering of successful blocks of files for obtaining Web server;
According to this final numbering obtained, from the blocks of files that the next one numbering of numbering final described in described file destination is corresponding, described file destination is uploaded to Web server.
3. a file uploading method, is characterized in that, the plug-in unit installing browser on the terminal device, as client, comprising:
Obtain the fileinfo of the file destination to be uploaded that client adopts libcurl technology to send with virtual html sheet format;
According to described fileinfo, generate the identification information of described file destination, and generate temp directory according to described fileinfo and described identification information, by described fileinfo and described identification information storage in a database;
Described identification information is sent to client, to make client putting in order according to the numbering of each blocks of files in described file destination, when the blocks of files of described file destination is uploaded to Web server successively, described fileinfo and described identification information are added in each blocks of files;
Download each blocks of files of described file destination, the information according to storing is verified the blocks of files that each is downloaded, and returns the Download Info of this blocks of files successively;
The blocks of files be verified is stored in described temp directory, and each blocks of files stored in described temp directory is merged.
4. method according to claim 3, is characterized in that,
Comprise further: the numbering of the blocks of files be verified is stored in log file;
After the described information according to storing is verified the blocks of files that each is downloaded, comprise further: when the described Download Info returning this blocks of files is successively this blocks of files failed download, receive the obtaining information that client sends, described obtaining information is for obtaining the numbering that self finally downloads successful blocks of files; In described log file, obtain the numbering that self finally downloads successful blocks of files, and described numbering is finally sent to client, continue to upload described file destination according to described numbering finally to make client; Downloading from the blocks of files corresponding to the next one of described numbering is finally numbered, in the described information according to storing, the blocks of files that each is downloaded being verified described in performing.
5. a client, is characterized in that, comprising:
Installation unit, for installing the plug-in unit of browser on the terminal device as client;
Acquiring unit, for obtaining the fileinfo of file destination to be uploaded;
Files passe unit, for adopting libcurl technology, the fileinfo of the described file destination obtained is uploaded to Web server with virtual html sheet format, with the identification information making Web server return described file destination, and store described fileinfo and described identification information;
Division unit, for according to the data length preset, is divided into more than one blocks of files by described file destination, and each blocks of files carries from putting in order corresponding numbering, described fileinfo and described identification information in described file destination;
Download Info returns unit, for putting in order of the numbering according to each blocks of files, utilize files passe thread that the blocks of files in described file destination is uploaded to Web server successively, the blocks of files that each is downloaded is verified according to the information stored to make Web server, and return the Download Info of this blocks of files successively, and Web server is merged to the successful blocks of files of download.
6. client according to claim 5, is characterized in that, comprises further:
Transmitting element, for sending obtaining information to Web server, described obtaining information finally downloads the numbering of successful blocks of files for obtaining Web server;
Described files passe unit, for according to this final numbering obtained, from the blocks of files that the next one numbering of numbering final described in described file destination is corresponding, is uploaded to Web server by described file destination.
7. a Web server, is characterized in that, comprising:
Installation unit, for installing the plug-in unit of browser on the terminal device as client;
Acquiring unit, for obtaining the fileinfo of the file destination to be uploaded that client adopts libcurl technology to send with virtual html sheet format;
Generation unit, for according to described fileinfo, generates the identification information of described file destination, and generates temp directory according to described fileinfo and described identification information, by described fileinfo and described identification information storage in a database;
Transmitting element, for described identification information is sent to client, to make client putting in order according to the numbering of each blocks of files in described file destination, when the blocks of files of described file destination is uploaded to Web server successively, described fileinfo and described identification information are added in each blocks of files;
Download authentication unit, for downloading each blocks of files of described file destination, the information according to storing is verified the blocks of files that each is downloaded, and returns the Download Info of this blocks of files successively;
Merge cells, for the blocks of files be verified being stored in described temp directory, and merges each blocks of files stored in described temp directory.
8. Web server according to claim 7, is characterized in that,
Comprise further: memory cell, for the numbering of the blocks of files be verified is stored in log file;
Resume unit, for when the described Download Info returning this blocks of files is successively this blocks of files failed download, receive the obtaining information that client sends, described obtaining information is for obtaining the numbering that self finally downloads successful blocks of files; In described log file, obtain the numbering that self finally downloads successful blocks of files, and described numbering is finally sent to client, continue to upload described file destination according to described numbering finally to make client; Download from the blocks of files corresponding to the next one of described numbering is finally numbered, and the blocks of files of download sent to described download authentication unit to verify.
CN201410851909.8A 2014-12-31 2014-12-31 File uploading method and device Pending CN104468843A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410851909.8A CN104468843A (en) 2014-12-31 2014-12-31 File uploading method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410851909.8A CN104468843A (en) 2014-12-31 2014-12-31 File uploading method and device

Publications (1)

Publication Number Publication Date
CN104468843A true CN104468843A (en) 2015-03-25

Family

ID=52914194

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410851909.8A Pending CN104468843A (en) 2014-12-31 2014-12-31 File uploading method and device

Country Status (1)

Country Link
CN (1) CN104468843A (en)

Cited By (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105025106A (en) * 2015-07-28 2015-11-04 焦点科技股份有限公司 Breakpoint resuming method based on segmentation and meta-information
CN106790653A (en) * 2017-01-17 2017-05-31 上海泓智信息科技有限公司 Document transmission processing method and device
CN106817391A (en) * 2015-12-01 2017-06-09 百度在线网络技术(北京)有限公司 Document breakpoint transmission method and apparatus
CN106921682A (en) * 2015-12-24 2017-07-04 百度在线网络技术(北京)有限公司 File uploading method and device
CN107172131A (en) * 2017-04-26 2017-09-15 腾讯科技(深圳)有限公司 File uploading method and device
CN107613031A (en) * 2017-11-08 2018-01-19 杭州亿方云网络科技有限公司 A kind of document transmission system
CN107623710A (en) * 2016-07-15 2018-01-23 深圳市斑点猫信息技术有限公司 A kind of file uploading method and terminal
CN108234539A (en) * 2016-12-14 2018-06-29 北京金山云网络技术有限公司 A kind of file upload, download, transmission method and device
CN108347463A (en) * 2017-01-23 2018-07-31 普天信息技术有限公司 A kind of terminal document method for uploading
CN108769127A (en) * 2018-05-02 2018-11-06 张东军 A kind of big file uploading and download process method
CN109831481A (en) * 2018-12-21 2019-05-31 厦门市美亚柏科信息股份有限公司 A kind of method, apparatus and storage medium of big file declustering transmission
CN109918346A (en) * 2019-02-27 2019-06-21 苏州浪潮智能科技有限公司 A kind of creation method and device of file
CN110769030A (en) * 2019-09-12 2020-02-07 上海艾拉比智能科技有限公司 Method, terminal, server and storage medium for downloading file
CN111193785A (en) * 2019-12-20 2020-05-22 北京淇瑀信息科技有限公司 File cutting transmission method and device and electronic equipment
CN111225058A (en) * 2020-01-09 2020-06-02 深圳壹账通智能科技有限公司 File uploading method and related product
CN111385354A (en) * 2020-03-02 2020-07-07 拉扎斯网络科技(上海)有限公司 File transmission method and device, electronic equipment and nonvolatile storage medium
CN112019447A (en) * 2020-08-19 2020-12-01 博锐尚格科技股份有限公司 Data flow control method, device, system, electronic equipment and storage medium
CN112165515A (en) * 2020-09-17 2021-01-01 国义招标股份有限公司 File storage method and system based on cloud server
CN112217903A (en) * 2020-10-27 2021-01-12 广东广宇科技发展有限公司 Large file transmission method, device, server and storage medium
CN112532740A (en) * 2020-12-11 2021-03-19 平安科技(深圳)有限公司 File uploading method and device and file checking method and device
CN112583743A (en) * 2020-09-28 2021-03-30 京信数据科技有限公司 Distributed file exchange method and device
CN112738157A (en) * 2020-12-11 2021-04-30 苏州浪潮智能科技有限公司 File uploading method, system and equipment
CN114866536A (en) * 2022-05-31 2022-08-05 北京奕斯伟计算技术有限公司 File uploading method and WEB front end

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7636767B2 (en) * 2005-11-29 2009-12-22 Cisco Technology, Inc. Method and apparatus for reducing network traffic over low bandwidth links
CN101719926A (en) * 2009-12-03 2010-06-02 成都耀邦科技有限责任公司 Web service multithreading file uploading system
CN102035859A (en) * 2009-09-28 2011-04-27 北大方正集团有限公司 Method, system and device for displaying upload progress
CN103067505A (en) * 2012-12-30 2013-04-24 乐视网信息技术(北京)股份有限公司 Method for uploading files to server
CN103401767A (en) * 2013-08-19 2013-11-20 北京时代亿信科技有限公司 Mail attachment processing method and mail attachment processing device
CN103533046A (en) * 2013-10-12 2014-01-22 苏州大学 Public-verifiable linear algebra entrusted calculation system
CN103581242A (en) * 2012-07-27 2014-02-12 腾讯科技(深圳)有限公司 Method, client-side equipment, server and system for uploading files
CN103731499A (en) * 2013-12-31 2014-04-16 兴天通讯技术(天津)有限公司 Terminal and file transfer method

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7636767B2 (en) * 2005-11-29 2009-12-22 Cisco Technology, Inc. Method and apparatus for reducing network traffic over low bandwidth links
CN102035859A (en) * 2009-09-28 2011-04-27 北大方正集团有限公司 Method, system and device for displaying upload progress
CN101719926A (en) * 2009-12-03 2010-06-02 成都耀邦科技有限责任公司 Web service multithreading file uploading system
CN103581242A (en) * 2012-07-27 2014-02-12 腾讯科技(深圳)有限公司 Method, client-side equipment, server and system for uploading files
CN103067505A (en) * 2012-12-30 2013-04-24 乐视网信息技术(北京)股份有限公司 Method for uploading files to server
CN103401767A (en) * 2013-08-19 2013-11-20 北京时代亿信科技有限公司 Mail attachment processing method and mail attachment processing device
CN103533046A (en) * 2013-10-12 2014-01-22 苏州大学 Public-verifiable linear algebra entrusted calculation system
CN103731499A (en) * 2013-12-31 2014-04-16 兴天通讯技术(天津)有限公司 Terminal and file transfer method

Cited By (32)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105025106B (en) * 2015-07-28 2016-03-30 焦点科技股份有限公司 A kind of method of the breakpoint transmission based on piecemeal and metamessage
CN105025106A (en) * 2015-07-28 2015-11-04 焦点科技股份有限公司 Breakpoint resuming method based on segmentation and meta-information
CN106817391A (en) * 2015-12-01 2017-06-09 百度在线网络技术(北京)有限公司 Document breakpoint transmission method and apparatus
CN106921682A (en) * 2015-12-24 2017-07-04 百度在线网络技术(北京)有限公司 File uploading method and device
CN107623710A (en) * 2016-07-15 2018-01-23 深圳市斑点猫信息技术有限公司 A kind of file uploading method and terminal
CN108234539A (en) * 2016-12-14 2018-06-29 北京金山云网络技术有限公司 A kind of file upload, download, transmission method and device
CN108234539B (en) * 2016-12-14 2022-06-03 北京金山云网络技术有限公司 File uploading, downloading and transmitting method and device
CN106790653A (en) * 2017-01-17 2017-05-31 上海泓智信息科技有限公司 Document transmission processing method and device
CN106790653B (en) * 2017-01-17 2020-04-24 上海泓智信息科技有限公司 File transmission processing method and device
CN108347463A (en) * 2017-01-23 2018-07-31 普天信息技术有限公司 A kind of terminal document method for uploading
CN108347463B (en) * 2017-01-23 2021-06-18 普天信息技术有限公司 Terminal file uploading method
CN107172131A (en) * 2017-04-26 2017-09-15 腾讯科技(深圳)有限公司 File uploading method and device
CN107172131B (en) * 2017-04-26 2020-12-04 腾讯科技(深圳)有限公司 File uploading method and device
CN107613031A (en) * 2017-11-08 2018-01-19 杭州亿方云网络科技有限公司 A kind of document transmission system
CN108769127A (en) * 2018-05-02 2018-11-06 张东军 A kind of big file uploading and download process method
CN109831481A (en) * 2018-12-21 2019-05-31 厦门市美亚柏科信息股份有限公司 A kind of method, apparatus and storage medium of big file declustering transmission
CN109918346A (en) * 2019-02-27 2019-06-21 苏州浪潮智能科技有限公司 A kind of creation method and device of file
CN110769030A (en) * 2019-09-12 2020-02-07 上海艾拉比智能科技有限公司 Method, terminal, server and storage medium for downloading file
CN111193785A (en) * 2019-12-20 2020-05-22 北京淇瑀信息科技有限公司 File cutting transmission method and device and electronic equipment
CN111225058A (en) * 2020-01-09 2020-06-02 深圳壹账通智能科技有限公司 File uploading method and related product
WO2021139132A1 (en) * 2020-01-09 2021-07-15 深圳壹账通智能科技有限公司 File uploading method and related product
CN111225058B (en) * 2020-01-09 2023-11-03 深圳壹账通智能科技有限公司 File uploading method and related products
CN111385354A (en) * 2020-03-02 2020-07-07 拉扎斯网络科技(上海)有限公司 File transmission method and device, electronic equipment and nonvolatile storage medium
CN112019447A (en) * 2020-08-19 2020-12-01 博锐尚格科技股份有限公司 Data flow control method, device, system, electronic equipment and storage medium
CN112165515A (en) * 2020-09-17 2021-01-01 国义招标股份有限公司 File storage method and system based on cloud server
CN112583743A (en) * 2020-09-28 2021-03-30 京信数据科技有限公司 Distributed file exchange method and device
CN112217903A (en) * 2020-10-27 2021-01-12 广东广宇科技发展有限公司 Large file transmission method, device, server and storage medium
CN112217903B (en) * 2020-10-27 2023-08-15 广东广宇科技发展有限公司 Large file transmission method, device, server and storage medium
CN112532740A (en) * 2020-12-11 2021-03-19 平安科技(深圳)有限公司 File uploading method and device and file checking method and device
CN112738157A (en) * 2020-12-11 2021-04-30 苏州浪潮智能科技有限公司 File uploading method, system and equipment
CN112532740B (en) * 2020-12-11 2022-11-15 平安科技(深圳)有限公司 File uploading method and device and file checking method and device
CN114866536A (en) * 2022-05-31 2022-08-05 北京奕斯伟计算技术有限公司 File uploading method and WEB front end

Similar Documents

Publication Publication Date Title
CN104468843A (en) File uploading method and device
CN110442524B (en) Method and device for testing web service interface with authentication authorization
CN107623698B (en) Method and device for remotely debugging network equipment
CN103475682B (en) File transfer method and file transfer equipment
CN106936633B (en) Application installation package manufacturing method and server
CN106339273A (en) Application program restoration method, terminal and server
CN108228228B (en) Application software publishing method and device
CN103812882A (en) Method and system for transferring files
CN107168739A (en) POS, POS wireless communication module firmware upgrade method and device
CN109391673A (en) A kind of method, system and the terminal device of management update file
CN110661829B (en) File downloading method and device, client and computer readable storage medium
CN104468637A (en) Method and equipment for downloading and installing client
CN110213113B (en) WEB configuration management method of base station and base station
CN111159000B (en) Server performance test method, device, equipment and storage medium
CN105119722A (en) Identity verification method, equipment and system
CN111694749A (en) Automatic interface testing method and device, computer equipment and readable storage medium
CN104077131A (en) Component deployment system and method
CN112039900B (en) Network security risk detection method, system, computer device and storage medium
WO2022142153A1 (en) Electricity meter upgrading method and system, smart meter, and storage medium
US10291718B2 (en) Method and apparatus for implementing communication from web page to client
CN106203179B (en) A kind of completeness check system and method for pair of file
CN102622550A (en) Safe online patch check system facing terminal computers
CN103139298B (en) Method for transmitting network data and device
CN103095698B (en) The restorative procedure of client software, device and communication system
CN111752789B (en) Pressure testing method, computer device and computer readable storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20150325

WD01 Invention patent application deemed withdrawn after publication