CN104113594A - Method and system for file uploading based on JS uploading assembly - Google Patents

Method and system for file uploading based on JS uploading assembly Download PDF

Info

Publication number
CN104113594A
CN104113594A CN201410317773.2A CN201410317773A CN104113594A CN 104113594 A CN104113594 A CN 104113594A CN 201410317773 A CN201410317773 A CN 201410317773A CN 104113594 A CN104113594 A CN 104113594A
Authority
CN
China
Prior art keywords
file
client
transmitting assembly
uploading
module
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
CN201410317773.2A
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.)
Beijing Si Tech Information Technology Co Ltd
Original Assignee
Beijing Si Tech Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Si Tech Information Technology Co Ltd filed Critical Beijing Si Tech Information Technology Co Ltd
Priority to CN201410317773.2A priority Critical patent/CN104113594A/en
Publication of CN104113594A publication Critical patent/CN104113594A/en
Pending legal-status Critical Current

Links

Abstract

The invention relates to a method and a system for file uploading based on a JS uploading assembly. The method comprises the following steps: a client customizes a JS uploading assembly, and a WEB server establishes a file receiving service; the client uses the customized JS uploading assembly to upload the file to the WEB server, and the WEB server stores the uploaded file in a temporary directory; the uploaded file is analyzed, and a service processing program is called to perform service processing if the file needs service processing; if the file needs to be uploaded to a specified file server, the file is synchronized to the corresponding file server; and the WEB server returns a file processing result to the client and displays an uploaded file list on an interface to provide a file management function. The development workload of developers is reduced to a great extent. Developers can complete the task of file uploading and synchronize needed files to a file server only by use of a customized JS uploading assembly, which is conducive to unified file management.

Description

A kind of file uploading method and system based on JS transmitting assembly
Technical field
The present invention relates to the communications field, relate in particular to a kind of file uploading method and system based on JS transmitting assembly.
Background technology
At present, file is uploaded the processing mode of the simple specification of neither one, is mainly manifested in:
1. it is complicated that file is uploaded exploitation, needs customized content many, developer required too high;
2. upload file lacks management, and major part is to upload to WEB server, the server of neither one centralized management file;
3. developer is more random to the processing of file, easily causes the various defects of system;
4. file is uploaded different style, the style that neither one is unified;
5. most of file upload function is incomplete, and upload function is only provided, and does not provide file to download the function of checking.
Summary of the invention
Technical problem to be solved by this invention is for the deficiencies in the prior art, and a kind of file uploading method and system based on JS transmitting assembly is provided.
The technical scheme that the present invention solves the problems of the technologies described above is as follows: a kind of file uploading method based on JS transmitting assembly, comprises the steps:
Step 1: the JS transmitting assembly that client terminal to customize upload file is required, WEB server is set up service end file and is received service;
Step 2: when client is initiated file upload request to WEB server, set up file uploading channel between client and WEB server;
Step 3: the JS transmitting assembly of client utilization customization uploads to WEB server by file uploading channel by file, and WEB server is stored in the file of uploading in temp directory;
Step 4: resolve the file of uploading, whether the file that judgement is uploaded needs to carry out Business Processing, if it is calls business processing program and carries out Business Processing, execution step 5; Otherwise directly perform step 5;
Step 5: judge whether file needs to upload to the file server of appointment, if needed, file synchronization, to corresponding file server, is performed step to 6; Otherwise directly perform step 6;
Step 6: backspace file result is to client, and in showing interface upload file list, provide file management facilities.
The invention has the beneficial effects as follows: the method has reduced developer's development amount to a great extent, developer only need utilize the JS transmitting assembly of customization, can realize the task that file is uploaded, and by having the file synchronization needing to file server, be convenient to file to carry out unified management.
On the basis of technique scheme, the present invention can also do following improvement.
Further, the specific implementation that customizes the required JS upstream components of upload file described in step 1 is: client is introduced basic JS transmitting assembly, customizes the required JS transmitting assembly of upload file according to service needed on the basis of basic JS transmitting assembly.
Further, in step 1 WEB server set up service end file receive service specific implementation be: WEB server by reference Jar pack assembly set up service end file receive service.
Further, the file process result that returns to client described in step 6 comprises file store path and Business Processing situation.
Further, file management facilities described in step 6 comprise that file is downloaded and file is deleted.
Another technical scheme that the present invention solves the problems of the technologies described above is as follows: a kind of file uploading system based on JS transmitting assembly, comprises client, WEB server and file server; Described client comprises transmission module and result display module on JS transmitting assembly customized module, file; Described WEB server comprises file receiver module, temp directory module, document analysis module, document processing module and file synchronization module;
Described JS transmitting assembly customized module, it is for the required JS transmitting assembly of upload file processed;
Transmission module on described file, it is for initiating file upload request to WEB server, and between WEB server, sets up file uploading channel; Utilize the JS transmitting assembly of customization by file uploading channel, file to be uploaded to the file receiver module of WEB server;
Described result display module, the file process result that it returns for showing WEB server, in showing interface upload file list, provides file management facilities;
Described file receiver module, it is for receiving the file of client upload, and is stored in temp directory module;
Described temp directory module, it is for storing the file of client upload;
Described document analysis module, it judges for resolving the file of uploading whether file needs to carry out Business Processing, if need to, call document processing module, otherwise to the event memory of client backspace file; It is also for judging whether file needs to be uploaded to specific file server, if need to, call file synchronization module, otherwise to the event memory of client backspace file;
Described document processing module, it is for the file of uploading is carried out to Business Processing, and result is returned to client;
Described file synchronization module, it is for the file server to appointment by file synchronization.
On the basis of technique scheme, the present invention can also do following improvement.
Further, the JS transmitting assembly customized module of described client, it,, by introducing basic JS transmitting assembly, customizes the required JS transmitting assembly of upload file according to service needed on the basis of basic JS transmitting assembly.
Further, the file receiver module of described WEB server, it sets up service end file reception service for quoting Jar pack assembly.
Further, the file process result that returns to client described in comprises file store path and Business Processing situation.
Further, the file management facilities that the result display module of described client provides comprise that file is downloaded and file is deleted.
Brief description of the drawings
Fig. 1 is a kind of file uploading method flow chart based on JS transmitting assembly of the present invention;
Fig. 2 is a kind of file uploading system block diagram based on JS transmitting assembly of the present invention.
In accompanying drawing, the list of parts of each label representative is as follows:
100, client, 200, WEB server, 300 file servers, 101, JS transmitting assembly customized module, 102, transmission module on file, 103, result display module, 201, file receiver module, 202, temp directory module, 203, document analysis module, 204, document processing module, 205, file synchronization module.
Embodiment
Below in conjunction with accompanying drawing, principle of the present invention and feature are described, example, only for explaining the present invention, is not intended to limit scope of the present invention.
As shown in Figure 1, a kind of file uploading method based on JS transmitting assembly, comprises the steps:
Step 1: the JS transmitting assembly that client terminal to customize upload file is required, WEB server is set up service end file and is received service;
Step 2: when client is initiated file upload request to WEB server, set up file uploading channel between client and WEB server;
Step 3: the JS transmitting assembly of client utilization customization uploads to WEB server by file uploading channel by file, and WEB server is stored in the file of uploading in temp directory;
Step 4: resolve the file of uploading, whether the file that judgement is uploaded needs to carry out Business Processing, if it is calls business processing program and carries out Business Processing, execution step 5; Otherwise directly perform step 5;
Step 5: judge whether file needs to upload to the file server of appointment, if needed, file synchronization, to corresponding file server, is performed step to 6; Otherwise directly perform step 6;
Step 6: backspace file result is to client, and in showing interface upload file list, provide file management facilities.
The specific implementation that customizes the required JS upstream components of upload file described in step 1 is: client is introduced basic JS transmitting assembly, customizes the required JS transmitting assembly of upload file according to service needed on the basis of basic JS transmitting assembly.
In step 1 WEB server set up service end file receive service specific implementation be: WEB server by reference Jar pack assembly set up service end file receive service.
The file process result that returns to client described in step 6 comprises file store path and Business Processing situation.
File management facilities described in step 6 comprise that file is downloaded and file is deleted.
As shown in Figure 2, a kind of file uploading system based on JS transmitting assembly, comprises client 100, WEB server 200 and file server 300; Described client 100 comprises transmission module 102 and result display module 103 on JS transmitting assembly customized module 101, file; Described WEB server 200 comprises file receiver module 201, temp directory module 202, document analysis module 203, document processing module 204 and file synchronization module 205;
Described JS transmitting assembly customized module 101, it is for the required JS transmitting assembly of upload file processed;
Transmission module 102 on described file, it is for initiating file upload request to WEB server, and between WEB server, sets up file uploading channel; Utilize the JS transmitting assembly of customization by file uploading channel, file to be uploaded to the file receiver module of WEB server;
Described result display module 103, the file process result that it returns for showing WEB server 200, in showing interface upload file list, provides file management facilities;
Described file receiver module 201, the file that it is uploaded for receiving client 100, and be stored in temp directory module 202;
Described temp directory module 202, the file that it is uploaded for storing client 100;
Described document analysis module 203, it judges for resolving the file of uploading whether file needs to carry out Business Processing, if need to, call document processing module 204, otherwise to the event memory of client 100 backspace files; It is also for judging whether file needs to be uploaded to specific file server, if need to, call file synchronization module 205, otherwise to the event memory of client 100 backspace files;
Described document processing module 204, it is for the file of uploading is carried out to Business Processing, and result is returned to client 100;
Described file synchronization module 205, it is for the file server 300 to appointment by file synchronization.
The JS transmitting assembly customized module 101 of described client 100, it,, by introducing basic JS transmitting assembly, customizes the required JS transmitting assembly of upload file according to service needed on the basis of basic JS transmitting assembly.
The file receiver module 201 of described WEB server 200, it sets up service end file reception service for quoting Jar pack assembly.
The described file process result that returns to client 100 comprises file store path and Business Processing situation.
The file management facilities that the result display module of described client 100 provides comprise that file is downloaded and file is deleted.
The method has reduced developer's development amount to a great extent, developer only need to utilize the JS transmitting assembly of customization, just can realize the task that file is uploaded, greatly reduce developer's workload, by having the file synchronization needing to file server, be convenient to file to carry out unified management simultaneously.
The foregoing is only preferred embodiment of the present invention, in order to limit the present invention, within the spirit and principles in the present invention not all, any amendment of doing, be equal to replacement, improvement etc., within all should being included in protection scope of the present invention.

Claims (10)

1. the file uploading method based on JS transmitting assembly, is characterized in that, comprises the steps:
Step 1: the JS transmitting assembly that client terminal to customize upload file is required, WEB server is set up service end file and is received service;
Step 2: when client is initiated file upload request to WEB server, set up file uploading channel between client and WEB server;
Step 3: the JS transmitting assembly of client utilization customization uploads to WEB server by file uploading channel by file, and WEB server is stored in the file of uploading in temp directory;
Step 4: resolve the file of uploading, whether the file that judgement is uploaded needs to carry out Business Processing, if it is calls business processing program and carries out Business Processing, execution step 5; Otherwise directly perform step 5;
Step 5: judge whether file needs to upload to the file server of appointment, if needed, file synchronization, to corresponding file server, is performed step to 6; Otherwise directly perform step 6;
Step 6: backspace file result is to client, and in showing interface upload file list, provide file management facilities.
2. a kind of file uploading method based on JS transmitting assembly according to claim 1, it is characterized in that, the specific implementation that customizes the required JS upstream components of upload file described in step 1 is: client is introduced basic JS transmitting assembly, customizes the required JS transmitting assembly of upload file according to service needed on the basis of basic JS transmitting assembly.
3. a kind of file uploading method based on JS transmitting assembly according to claim 1, it is characterized in that, in step 1 WEB server set up service end file receive service specific implementation be: WEB server by reference Jar pack assembly set up service end file receive service.
4. a kind of file uploading method based on JS transmitting assembly according to claim 1, is characterized in that, the file process result that returns to client described in step 6 comprises file store path and Business Processing situation.
5. a kind of file uploading method based on JS transmitting assembly according to claim 1, is characterized in that, file management facilities described in step 6 comprise that file is downloaded and file deletion.
6. the file uploading system based on JS transmitting assembly, is characterized in that, comprises client, WEB server and file server; Described client comprises transmission module and result display module on JS transmitting assembly customized module, file; Described WEB server comprises file receiver module, temp directory module, document analysis module, document processing module and file synchronization module;
Described JS transmitting assembly customized module, it is for the required JS transmitting assembly of upload file processed;
Transmission module on described file, it is for initiating file upload request to WEB server, and between WEB server, sets up file uploading channel; Utilize the JS transmitting assembly of customization by file uploading channel, file to be uploaded to the file receiver module of WEB server;
Described result display module, the file process result that it returns for showing WEB server, in showing interface upload file list, provides file management facilities;
Described file receiver module, it is for receiving the file of client upload, and is stored in temp directory module;
Described temp directory module, it is for storing the file of client upload;
Described document analysis module, it judges for resolving the file of uploading whether file needs to carry out Business Processing, if need to, call document processing module, otherwise to the event memory of client backspace file; It is also for judging whether file needs to be uploaded to specific file server, if need to, call file synchronization module, otherwise to the event memory of client backspace file;
Described document processing module, it is for the file of uploading is carried out to Business Processing, and result is returned to client;
Described file synchronization module, it is for the file server to appointment by file synchronization.
7. a kind of file uploading system based on JS transmitting assembly according to claim 6, it is characterized in that, the JS transmitting assembly customized module of described client, it,, by introducing basic JS transmitting assembly, customizes the required JS transmitting assembly of upload file according to service needed on the basis of basic JS transmitting assembly.
8. a kind of file uploading system based on JS transmitting assembly according to claim 6, is characterized in that, the file receiver module of described WEB server, and it is set up service end file and receives service for quoting Jar pack assembly.
9. a kind of file uploading system based on JS transmitting assembly according to claim 6, is characterized in that, described in return to client file process result comprise file store path and Business Processing situation.
10. a kind of file uploading system based on JS transmitting assembly according to claim 6, is characterized in that, the file management facilities that the result display module of described client provides comprise that file is downloaded and file deletion.
CN201410317773.2A 2014-07-04 2014-07-04 Method and system for file uploading based on JS uploading assembly Pending CN104113594A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410317773.2A CN104113594A (en) 2014-07-04 2014-07-04 Method and system for file uploading based on JS uploading assembly

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410317773.2A CN104113594A (en) 2014-07-04 2014-07-04 Method and system for file uploading based on JS uploading assembly

Publications (1)

Publication Number Publication Date
CN104113594A true CN104113594A (en) 2014-10-22

Family

ID=51710226

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410317773.2A Pending CN104113594A (en) 2014-07-04 2014-07-04 Method and system for file uploading based on JS uploading assembly

Country Status (1)

Country Link
CN (1) CN104113594A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105577733A (en) * 2014-11-05 2016-05-11 中国银联股份有限公司 Asynchronous transmission mode-based file uploading method and system
CN106126276A (en) * 2016-06-17 2016-11-16 浪潮电子信息产业股份有限公司 A kind of call the device of transmitting assembly, method and system
CN106681860A (en) * 2016-12-01 2017-05-17 广东欧珀移动通信有限公司 Data backup method and data backup device
CN107071058A (en) * 2017-05-24 2017-08-18 深圳市可可卓科科技有限公司 Asynchronous data upload process method and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1988535A (en) * 2005-12-23 2007-06-27 腾讯科技(深圳)有限公司 Synchronous method, system for file storage and customer terminal
US20080263179A1 (en) * 2005-10-28 2008-10-23 Gerard John Buttner System and method for dynamically updating web pages using messaging-oriented middleware
CN101567893A (en) * 2009-05-26 2009-10-28 中兴通讯股份有限公司 Method and system for uploading files in WEB application
CN103246730A (en) * 2013-05-08 2013-08-14 网易(杭州)网络有限公司 File storage method and device and file sensing method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080263179A1 (en) * 2005-10-28 2008-10-23 Gerard John Buttner System and method for dynamically updating web pages using messaging-oriented middleware
CN1988535A (en) * 2005-12-23 2007-06-27 腾讯科技(深圳)有限公司 Synchronous method, system for file storage and customer terminal
CN101567893A (en) * 2009-05-26 2009-10-28 中兴通讯股份有限公司 Method and system for uploading files in WEB application
CN103246730A (en) * 2013-05-08 2013-08-14 网易(杭州)网络有限公司 File storage method and device and file sensing method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
龚军等: "基于Javascript和Struts不定数量文件上传的设计", 《工程技术》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105577733A (en) * 2014-11-05 2016-05-11 中国银联股份有限公司 Asynchronous transmission mode-based file uploading method and system
CN106126276A (en) * 2016-06-17 2016-11-16 浪潮电子信息产业股份有限公司 A kind of call the device of transmitting assembly, method and system
CN106126276B (en) * 2016-06-17 2019-03-08 浪潮电子信息产业股份有限公司 A kind of device, method and system for calling transmitting assembly
CN106681860A (en) * 2016-12-01 2017-05-17 广东欧珀移动通信有限公司 Data backup method and data backup device
CN106681860B (en) * 2016-12-01 2019-07-30 Oppo广东移动通信有限公司 A kind of data back up method and data backup device
CN107071058A (en) * 2017-05-24 2017-08-18 深圳市可可卓科科技有限公司 Asynchronous data upload process method and system

Similar Documents

Publication Publication Date Title
CN104899325A (en) APP (application) acquired data collection method, terminal, server and system
CN102917061B (en) Resource synchronization method and system
CN103209087A (en) Distributed log statistical processing method and system
CN104113594A (en) Method and system for file uploading based on JS uploading assembly
CN106598678A (en) Method and device for supplying application installation packages to terminal equipment
CN103297275A (en) Dynamic discovery and loading system and method for Web network management client module
CN103220643B (en) Information providing method and device, ATL matching process and device
CN102904960A (en) Information synchronizing system and method based on really simple syndication (RSS)
CN103841180A (en) Network data synchronization method and device based on operating instruction, terminal device and server
CN103078899A (en) Method and device for synchronizing enterprise address book
MX2022008863A (en) Electricity meter upgrading method and system, smart meter, and storage medium.
KR101086620B1 (en) Smart office system and server for managing the sames and method for managing the sames
US10331484B2 (en) Distributed data platform resource allocator
US10938773B2 (en) Method and apparatus for synchronizing contact information and medium
CN109218041B (en) Request processing method and device for server system
CN105959363A (en) Big data cluster deployment method capable of adapting to hardware configuration
CN111813685B (en) Automatic test method and device
CN104065613B (en) Synchronous method, system and the device of a kind of off-line operation data of application
CN105227351A (en) Log acquisition system, journal obtaining method and electronic equipment
CN105490852B (en) A kind of upgrade detection method and device
CN103440145A (en) Method and device for updating application programs and mobile terminal
CN105407133A (en) Method and system for mobile application automation release
CN111488268A (en) Dispatching method and dispatching device for automatic test
CN104717286A (en) Data processing method, terminal, server and system
US9749426B2 (en) Method, system, and apparatus for agent-based architecture for integrated mobile applications

Legal Events

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

Application publication date: 20141022

RJ01 Rejection of invention patent application after publication