CN102546732A - File transmission method and system in webpage - Google Patents

File transmission method and system in webpage Download PDF

Info

Publication number
CN102546732A
CN102546732A CN201010624242XA CN201010624242A CN102546732A CN 102546732 A CN102546732 A CN 102546732A CN 201010624242X A CN201010624242X A CN 201010624242XA CN 201010624242 A CN201010624242 A CN 201010624242A CN 102546732 A CN102546732 A CN 102546732A
Authority
CN
China
Prior art keywords
file
webpage
client
status
transmission
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.)
Granted
Application number
CN201010624242XA
Other languages
Chinese (zh)
Other versions
CN102546732B (en
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.)
Peking University Founder Group Co Ltd
Beijing Founder Electronics Co Ltd
Original Assignee
Peking University Founder Group Co Ltd
Beijing Founder Electronics 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 Peking University Founder Group Co Ltd, Beijing Founder Electronics Co Ltd filed Critical Peking University Founder Group Co Ltd
Priority to CN201010624242.XA priority Critical patent/CN102546732B/en
Publication of CN102546732A publication Critical patent/CN102546732A/en
Application granted granted Critical
Publication of CN102546732B publication Critical patent/CN102546732B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a file transmission method and system in a webpage. The method comprises the following steps of: first, loading a client end program with an FTP (file transfer protocol) transmission function, then packaging an OCX (object linking and embedding control extension) used for adding uploading files or selecting downloading files into the webpage, and finally, realizing file transmission through calling the client end program. The method has the advantages that the webpage is separated from specific operations in a file transmission process and users can perform other operations while transmitting files. Through adoption of the method and the system provided by the invention, the coupling of the webpage and a specific FTP transmission function can be reduced, the loading speed of the webpage is improved, the webpage operation is more flexible and the users do not need to wait for the webpage all the time.

Description

Document transmission method in a kind of webpage and system
Technical field
The present invention relates to the file transfer technology in the internet arena, be specifically related to document transmission method and system in a kind of webpage.
Background technology
Along with popularizing and the raising of business complexity of network, even in the B/S system, it is more and more common and important that the demand of transfer files also becomes.Consider that File Transfer Protocol compares with http protocol in transmission advantage on speed during big file, generally when big file is transmitted, can adopt File Transfer Protocol.
FTP is that the English of File Transfer Protocol (FTP) is called for short, and is mainly used in the transmitted in both directions of the control documents on the Internet.Simultaneously, it also is an application program (Application), and the user can link to each other a large amount of programs and information on the access server to oneself PC with all servers that move File Transfer Protocol all over the world through it.The main effect of FTP; Letting the user connect a remote computer (moving the ftp server program on these computers) exactly watches remote computer which file is arranged; Copy local computer to file from remote computer then, or deliver to remote computer to the file of local computer.
Tradition realizes that the method for FTP transfer function is: an embedded control that can have the FTP transfer function in webpage, this control be one all functions all be encapsulated into DLL together, perhaps the control of extended formatting such as OCX.Though can realize the transmission of file like this, also have two main shortcomings: at first, can cause the loading velocity of webpage slack-off like this because control is bigger; Secondly, because the FTP transfer function is encapsulated on the control of webpage, in the transmission course of file, current webpage does not allow to close, and jumps to other webpages, otherwise transmission will stop.For bigger file, the time of generally uploading or downloading all can be long, and therefore second shortcoming change is more obvious.
Summary of the invention
To the defective that exists in the prior art; The object of the present invention is to provide document transmission method and system in a kind of webpage; Reduce webpage itself and the specifically coupling of FTP transfer function through these method and system, the loading velocity that improves webpage also makes web page operation more flexible.
For solving the problems of the technologies described above, the technical scheme that the present invention adopts is following:
Document transmission method in a kind of webpage may further comprise the steps:
1) client-side program with FTP transfer function is set, and will be used for selecting the OCX control of transfer files to be encapsulated into webpage;
2) load described OCX control, the file that selection need be transmitted;
3) carry out the transmission of file through described client-side program.
Further, the document transmission method in the aforesaid webpage, in the step 3), the transmission of described file comprises from this locality to the ftp server upload file, perhaps from ftp server to local file in download.
Further, the document transmission method in the aforesaid webpage in the step 3), also comprises the program of viewing client-side and the operation whether webpage closes simultaneously in the process of file transfer, if; End of file transfer then; If not, then file continues transmission.
Further, whether the document transmission method in the aforesaid webpage in the step 3), when carrying out the transmission of file, detects client-side program through said OCX control and moves, if, the file status in the status file of reading and recording then; If not, then start client-side program, and the fileinfo of the file that will transmit is saved in the status file of described record through said OCX control.
Further, the status file of described record be used for writing down transmitting and etc. listed files to be transmitted, when file begins to transmit, for transmitting, and be thread journal file of its generation with the Status Change of waiting for transfer files.
Further, described journal file called after file status+sequence number.
Further again, described journal file internal form is made up of 5 parts, is respectively:
Whether transmit: the delivery status of logo file;
The local file name: file local store path;
Ftp file name: the store path of file on ftp server;
File size: total size of file;
Passed byte number: the size of having transmitted.
Further, the document transmission method in the aforesaid webpage through being provided with and reading the internal form information in the journal file, is realized the transmission and the breakpoint transmission function of file.
The present invention also provides the document transmission system in a kind of webpage, and this system comprises:
OCX control packaging system: be used for the OCX control of selecting transfer files is encapsulated into webpage;
File choice device: be used for the OCX control of Web page loading and the file that selection need be transmitted;
File transfer means: be used to be provided with client-side program, and carry out the transmission of file through client-side program with FTP transfer function.
Further, the document transmission system in the aforesaid webpage, described file transfer means comprises that also program checks module, is used for viewing client-side program and webpage and whether closes simultaneously, if, end of file transfer then; If not, then file continues transmission.
Further, the document transmission system in the aforesaid webpage, described file transfer means also comprises the program start module, is used for starting client-side program through described OCX control.
Further; Document transmission system in the aforesaid webpage; Be provided with the status file of record in the described file transfer means, the status file of described record be used for writing down transmitting and etc. listed files to be transmitted, when file begins to transmit; For transmitting, and is thread journal file of its generation with the Status Change of waiting for transfer files.
Effect of the present invention is: the present invention is through perhaps selecting the independent encapsulation of the OCX control of file in download with only being responsible for the interpolation upload file; Realized separating of webpage and concrete operations; Reduced the coupling of webpage with concrete FTP transfer function; Improved the loading velocity of webpage, and made web page operation more flexible, need not the user and wait at webpage always.
Description of drawings
Fig. 1 is the structured flowchart of the document transmission system in a kind of webpage in the specific embodiment of the invention;
Fig. 2 is the flow chart of the document transmission method in a kind of webpage in the specific embodiment of the invention;
Fig. 3 selects the design sketch of upload file for utilizing the OCX control in the embodiment of the invention 1;
Fig. 4 is the flow chart of a document transmission process in the embodiment of the invention 1;
Fig. 5 utilizes client-side program to carry out the design sketch that file is uploaded in the embodiment of the invention 1.
Embodiment
Through accompanying drawing and specific embodiment the present invention is done further description below.
Fig. 1 shows the structured flowchart of the document transmission system in a kind of webpage in the specific embodiment of the invention, and is as shown in the figure, and this system comprises:
OCX control packaging system 11: be used for selecting the OCX control of transfer files to be encapsulated into webpage, select transfer files to comprise and add upload file or select file in download with being responsible for.The OCX control is a kind of object linking and embedding user control, and the OCX control of the various functions of encapsulation is known technology for a person skilled in the art in webpage.
File choice device 12: be used for the OCX control of Web page loading and the file that selection need be transmitted.
File transfer means 13: be used to be provided with client-side program, and carry out the transmission of file through described client-side program with FTP transfer function.FTP is mainly used in the transmitted in both directions of the control documents on the Internet; It is a known application program; Therefore, (or other space) client-side program with FTP transfer function is set is to realize very easily for a person skilled in the art on the desktop of local computer.
File transfer means 13 comprises that also program checks module 131 and program start module 132.Wherein, program checks that module 131 is used for the viewing client-side program and whether webpage closes simultaneously, and program start module 132 is used under the situation that client-side program does not start, and starts client-side program through said OCX control, and then accomplishes the transmission of file.Be provided with the status file of record in the file transfer means 13; The status file of described record be used for writing down transmitting and etc. listed files to be transmitted; When file begins to transmit, for transmitting, and be thread journal file of its generation with the Status Change of waiting for transfer files.
Fig. 2 shows the flow chart based on the document transmission method in a kind of webpage of the document transmission system among Fig. 1, and is as shown in the figure, and this method may further comprise the steps:
Step S21: the encapsulation of the setting of client-side program and OCX control;
Client-side program with FTP transfer function is set, and will be used for selecting the OCX control of transfer files to be encapsulated into webpage; The present invention's independent setting through the encapsulation of client-side program and OCX control has just realized that with loading webpage file selects separating of webpage and file transfer operation.Wherein, the OCX control is a kind of object linking and embedding user control, is a kind of program that can be created the special purpose of using by the application software of in the Windows of Microsoft system, moving, can be inserted in Web webpage or other application program.Webpage carries out uploading or the selection of downloaded files through the OCX control is encapsulated into just in embodiments of the present invention.
Step S22: the selection of transfer files;
OCX control in the Web page loading adds upload file or selects file in download through loading this OCX control, promptly carries out the selection of transfer files.
Step S23: the transmission of file;
When carrying out the transmission of file, need whether move through said OCX control viewing client-side program, if, the file status in the status file of reading and recording then; If not; Then start client-side program through said OCX control; And the fileinfo of the file that will transmit being used under being saved in write down in the status file of record of state of the file that needs transmission, the status file of record be used for writing down transmitting and etc. listed files to be transmitted, when file begins to transmit; For uploading, and is thread journal file of its generation with the Status Change of waiting for upload file.Journal file called after file status+sequence number.The journal file internal form is made up of 5 parts, is respectively:
(1) whether transmits: the delivery status of logo file;
(2) local file name: file is at the store path of this locality;
(3) ftp file name: the store path of file on ftp server;
(4) file size: total size of file;
(5) passed byte number: the size of having transmitted.
In transmission course,, promptly can realize the transmission and the breakpoint transmission function of file through being provided with and reading the internal form information in the journal file.
In addition, the file of the transmission transmission conditions that need satisfy are:
The file that a. need transmit is in readable state;
B. there is idle thread in the thread array of being responsible for transmitting.
In the transmission course of file, can confirm the state of transfer files through viewing client-side program and webpage, if client-side program is also moving, then file can continue transmission; Also not transmission completion of file then can start client-side program through the OCX control in the webpage if client-side program is closed, and make file continue transmission.
The embodiment that uploads and downloads through file comes the present invention is further explained respectively below.
Embodiment 1
Uploading of file: " uploading " file is exactly that file is copied on the ftp server from the computer of this locality.With the Internet language, the user can be through client-side program to the distance host upload file.
Want to the distance host upload file, at first need obtain the corresponding authority of this main frame.That is to say want which platform computer to transmit file, just must have the proper authorization of which platform computer with.After obtaining the authorization; At first load and be encapsulated in the OXC control in the webpage; Select to upload to the file on the distance host through this control, as shown in Figure 3 for select the effect sketch map of upload file through the OCX control, by finding out among the figure; Can be through increasing the file select a plurality of needs to upload from local computer, and file that will be to be uploaded is kept in the status file of record.The file that " CJ the Changjiang river derive advertisement publish the wrong .JPG of statistical tables and reports " need upload in this enforcement just.Accomplished the selection of upload file through the OCX control, and then accomplished the upload procedure of file through client-side program with FTP transfer function.
The flow chart of a document transmission process has been shown: at first accomplish webpage and load among Fig. 4 promptly through OCX control selection upload file; Coming viewing client-side to upload download tool then is whether client-side program moves; If then this program of file status operation in the status file of direct reading and recording is carried out uploading of file, if not; Then start client-side program earlier, carry out uploading of file then through the OCX control.By among the figure finding out in document transmission process whether to close simultaneously to confirm whether file transfer is accomplished through viewing client-side program and webpage.
Fig. 5 shows through client-side program and carries out the design sketch that file is uploaded.By finding out among the figure, in the process that file is uploaded, both can continue to increase the upload file of treating in the status file that is kept at record, also can delete and prepare the file uploaded.
Present embodiment comes the transmission branch of the selection of upload file and file and carries out, and has improved the loading velocity of webpage on the one hand, makes web page operation more flexible on the other hand, and the user need not to wait at current web page always.
Embodiment 2
The download of file: " download " file is exactly on the computer from the ftp server copied files to this locality; With the Internet language, the user can be through client-side program from the distance host file in download.
Similar with the upload file among the embodiment 1, want to download from distance host, also to obtain corresponding authority.After obtaining corresponding authority; At first; Load the OCX control, need downloaded files, promptly be equivalent to the user and send an order to server through the selection on the ftp server on the distance host of this control; Require server to the portion copy that the user transmits some files, be saved in the information of this document in the status file of record; Receive this file through client-side program then, and accomplish the concrete downloading process of file, and it is stored in user's oneself the computer.
Obviously, those skilled in the art can carry out various changes and modification to the present invention and not break away from the spirit and scope of the present invention.Like this, belong within the scope of claim of the present invention and equivalent technology thereof if of the present invention these are revised with modification, then the present invention also is intended to comprise these changes and modification interior.

Claims (12)

1. the document transmission method in the webpage may further comprise the steps:
1) client-side program with FTP transfer function is set, and will be used for selecting the OCX control of transfer files to be encapsulated into webpage;
2) load described OCX control, the file that selection need be transmitted;
3) carry out the transmission of file through described client-side program.
2. document transmission method as claimed in claim 1 is characterized in that: in the step 3), the transmission of described file comprises from this locality to the ftp server upload file, perhaps from ftp server to local file in download.
3. document transmission method as claimed in claim 1 is characterized in that: in the step 3), in the process of file transfer, also comprise the operation whether viewing client-side program and webpage close simultaneously, if; End of file transfer then; If not, then file continues transmission.
4. like claim 1 or 2 or 3 described document transmission methods, it is characterized in that: in the step 3), when carrying out the transmission of file, detect client-side program through said OCX control and whether move, if, the file status in the status file of reading and recording then; If not, then start client-side program, and the fileinfo of the file that will transmit is saved in the status file of described record through said OCX control.
5. document transmission method as claimed in claim 4; It is characterized in that: the status file of described record be used for writing down transmitting and etc. listed files to be transmitted; When file begins to transmit, for transmitting, and be thread journal file of its generation with the Status Change of waiting for transfer files.
6. document transmission method as claimed in claim 5 is characterized in that: described journal file called after file status+sequence number.
7. document transmission method as claimed in claim 6 is characterized in that: described journal file internal form is made up of 5 parts, is respectively:
Whether transmit: the transmission state of logo file;
The local file name: file is at the store path of this locality;
Ftp file name: the store path of file on ftp server;
File size: total size of file;
Passed byte number: the size of having transmitted.
8. document transmission method as claimed in claim 7 is characterized in that: through being provided with and reading the internal form information in the journal file, realize the transmission and the breakpoint transmission function of file.
9. the document transmission system in the webpage, this system comprises:
OCX control packaging system: be used for the OCX control of selecting transfer files is encapsulated into webpage;
File choice device: be used for the OCX control of Web page loading and the file that selection need be transmitted;
File transfer means: be used to be provided with client-side program, and carry out the transmission of file through client-side program with FTP transfer function.
10. document transmission system as claimed in claim 9 is characterized in that: described file transfer means comprises that also program checks module, be used for viewing client-side program and webpage and whether close simultaneously, if, end of file transfer then; If not, then file continues transmission.
11. document transmission system as claimed in claim 9 is characterized in that: described file transfer means also comprises the program start module, is used for starting client-side program through described OCX control.
12. document transmission system as claimed in claim 9; It is characterized in that: the status file that is provided with record in the described file transfer means; The status file of described record be used for writing down transmitting and etc. listed files to be transmitted; When file begins to transmit, for transmitting, and be thread journal file of its generation with the Status Change of waiting for transfer files.
CN201010624242.XA 2010-12-31 2010-12-31 File transmission method and system in webpage Expired - Fee Related CN102546732B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201010624242.XA CN102546732B (en) 2010-12-31 2010-12-31 File transmission method and system in webpage

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010624242.XA CN102546732B (en) 2010-12-31 2010-12-31 File transmission method and system in webpage

Publications (2)

Publication Number Publication Date
CN102546732A true CN102546732A (en) 2012-07-04
CN102546732B CN102546732B (en) 2015-03-18

Family

ID=46352688

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010624242.XA Expired - Fee Related CN102546732B (en) 2010-12-31 2010-12-31 File transmission method and system in webpage

Country Status (1)

Country Link
CN (1) CN102546732B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108632383A (en) * 2018-05-15 2018-10-09 中国电子科技集团公司第二十八研究所 A kind of method of serial ports transmitting file
CN108737558A (en) * 2018-05-30 2018-11-02 安徽四创电子股份有限公司 A kind of general management platform of file based on OCX controls
CN110175305A (en) * 2019-05-05 2019-08-27 中国银行股份有限公司 Data processing method, device, computer equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020184363A1 (en) * 2001-04-20 2002-12-05 Steven Viavant Techniques for server-controlled measurement of client-side performance
US20060242206A1 (en) * 2005-04-22 2006-10-26 Microsoft Corporation System and method for peer to peer synchronization of files
CN100476822C (en) * 2006-04-30 2009-04-08 中国工商银行股份有限公司 File transmission method and system
CN101567893A (en) * 2009-05-26 2009-10-28 中兴通讯股份有限公司 Method and system for uploading files in WEB application
CN101616145A (en) * 2008-06-26 2009-12-30 鸿富锦精密工业(深圳)有限公司 Cross-platform network communication means and be used for the communication server of cross-platform network communication

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020184363A1 (en) * 2001-04-20 2002-12-05 Steven Viavant Techniques for server-controlled measurement of client-side performance
US20060242206A1 (en) * 2005-04-22 2006-10-26 Microsoft Corporation System and method for peer to peer synchronization of files
CN100476822C (en) * 2006-04-30 2009-04-08 中国工商银行股份有限公司 File transmission method and system
CN101616145A (en) * 2008-06-26 2009-12-30 鸿富锦精密工业(深圳)有限公司 Cross-platform network communication means and be used for the communication server of cross-platform network communication
CN101567893A (en) * 2009-05-26 2009-10-28 中兴通讯股份有限公司 Method and system for uploading files in WEB application

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
郝平,应时彦,李瑞麟,梅一珉,彭宏: "一种基于ActiveX的远程双向数据传输技术", 《浙江工业大学学报》, vol. 30, no. 4, 31 August 2002 (2002-08-31) *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108632383A (en) * 2018-05-15 2018-10-09 中国电子科技集团公司第二十八研究所 A kind of method of serial ports transmitting file
CN108737558A (en) * 2018-05-30 2018-11-02 安徽四创电子股份有限公司 A kind of general management platform of file based on OCX controls
CN110175305A (en) * 2019-05-05 2019-08-27 中国银行股份有限公司 Data processing method, device, computer equipment and storage medium
CN110175305B (en) * 2019-05-05 2022-03-11 中国银行股份有限公司 Data processing method, data processing device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN102546732B (en) 2015-03-18

Similar Documents

Publication Publication Date Title
US8832161B2 (en) Interface for extending functionality of memory cards
US8973072B2 (en) System and method for programmatic link generation with media delivery
JP2019517042A (en) Providing access to hybrid applications offline
CN102184177A (en) Method and system for previewing file
US20070282941A1 (en) Information processing system, information processing apparatus, information processing method, and computer program
US9495323B2 (en) Copying data onto an expandable memory
CN103389969A (en) Method, device and system for previewing PDF (portable document format) file on mobile terminal
KR101280753B1 (en) Cloud service access apparatus and cloud service access method and cloud service access system
CN103092581A (en) Method and device for setting up Web front-end local development environment
CN109582644A (en) File memory method, device, equipment and computer readable storage medium
US20150134817A1 (en) Cloud server aggregator to facilitate access and transmission of data stored on multiple cloud servers
CN104035937A (en) Extensible system and method for electronic document online browsing
CN102200976A (en) Customizing system and method for converting desktop application into network application
US20090287715A1 (en) File sharing method and file sharing system for getting an accessible address through an address mapping server
CN111953642A (en) Method for uploading and downloading shared file by two-dimensional code
CN105491132A (en) File server, terminal and file subpackage transmission method
CN102523301A (en) Method for caching data on client in cloud storage
CN102546732A (en) File transmission method and system in webpage
US20130179398A1 (en) Device for synchronously sharing files and method for synchronously sharing files
CN102546703A (en) Method and system for transmitting network hard disk file
CN103973772B (en) File read/write method and device
CN103188327A (en) Method and system of file transfer
CN101345946B (en) Mobile phone cartoon generating system and method based on picture
CN104717242A (en) Method of editing shared file by multiple users, server and user side
CN105872857A (en) Video processing method and device and electronic equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20150318

Termination date: 20191231