CN109729120A - The method and device that file uploads - Google Patents
The method and device that file uploads Download PDFInfo
- Publication number
- CN109729120A CN109729120A CN201711042373.5A CN201711042373A CN109729120A CN 109729120 A CN109729120 A CN 109729120A CN 201711042373 A CN201711042373 A CN 201711042373A CN 109729120 A CN109729120 A CN 109729120A
- Authority
- CN
- China
- Prior art keywords
- file
- uploaded
- unit
- angular
- 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
Links
Abstract
The invention discloses the method and devices that a kind of file uploads, it is related to Internet technical field, in order to solve in the prior art, when it is angular-upload plug-in unit that the file installed in browser, which uploads plug-in unit, file is called to upload interface to server up transfer file using angular-upload plug-in unit, a local file can only be uploaded every time, use the lower problem of upper transfer efficiency of transmitting file on angular-upload plug-in unit so as to cause browser.The method comprise the steps that reception file chooses instruction, it includes the corresponding the file information of multiple files to be uploaded that file, which is chosen in instruction,;Respectively each file to be uploaded adds corresponding file input control;Multiple files to be uploaded are obtained according to the file information, and each file to be uploaded is temporarily stored into corresponding file input control respectively;When receiving file uploading instructions, multiple files to be uploaded are successively uploaded to server using angular-upload plug-in unit.The present invention is for viewing on device using angular-upload plug-in unit to during server up transfer file.
Description
Technical field
The present invention relates to Internet technical field, the method and device uploaded more particularly to a kind of file.
Background technique
Increasingly developed with Internet technology, the quantity of Internet user becomes more and more, passes through browser and incite somebody to action this
Ground file, which is uploaded to, to be shared with other users and has become a part indispensable in Internet user's daily life in network.
When user needs to upload local file in network, local file to be uploaded is obtained by browser first, is then used
File in browser uploads plug-in unit and file to be uploaded is uploaded to server.
Following technical problem exists in the prior art during realizing invention in inventor, when installing in browser
File upload plug-in unit be angular-upload plug-in unit when, using angular-upload plug-in unit call file upload interface to
Server up transfer file can only upload a local file every time, i.e. browser after obtaining some local file to be uploaded,
It will use angular-upload plug-in unit that the file to be uploaded is uploaded to server.Therefore, when user needs multiple
It when ground file is uploaded to server, needs repeatedly to be interacted with server, uses angular- so as to cause browser
The upper transfer efficiency of transmitting file is lower on upload plug-in unit.
Summary of the invention
In view of this, the method and device that file provided by the invention uploads, main purpose is that improving browser uses
The upper transfer efficiency of transmitting file on angular-upload plug-in unit.
To solve the above-mentioned problems, present invention generally provides following technical solutions:
In a first aspect, the present invention provides a kind of methods that file uploads, this method comprises:
Reception file chooses instruction, and it includes the corresponding the file information of multiple files to be uploaded that the file, which is chosen in instruction,;
Respectively each file to be uploaded adds corresponding file input control;
The multiple file to be uploaded is obtained according to the file information, and respectively keeps in each file to be uploaded
In corresponding file input control;
When receiving file uploading instructions, using angular-upload plug-in unit successively by the multiple file to be uploaded
It is uploaded to server.
Optionally, after respectively each file to be uploaded adds corresponding file input control, the method
Further include:
To add the click event of file to be uploaded respectively click event corresponding with each file input control into
Row binding.
Optionally, the multiple file to be uploaded is obtained according to the file information, comprising:
When detecting the click event of addition file to be uploaded, according to the file information obtain it is the multiple to
Upper transmitting file.
Optionally, when receiving file uploading instructions, using angular-upload plug-in unit successively will it is each described to
Upper transmitting file is uploaded to server, comprising:
When receiving file uploading instructions, interface is uploaded using angular-upload plug-in unit recursive call file;
Interface is uploaded by the file, and each file to be uploaded is successively uploaded to server.
Optionally, using angular-upload plug-in unit successively by each file to be uploaded be uploaded to server it
Before, the method also includes:
When receiving file deletion instruction, it is defeated that the specified corresponding file of file to be uploaded of instruction is deleted to the file
Enter control and carries out delete operation.
Second aspect, the present invention also provides the device that a kind of file uploads, which includes:
Receiving unit chooses instruction for receiving file, and it includes multiple files pair to be uploaded in instruction that the file, which is chosen,
The file information answered;
Adding unit adds corresponding file input control for respectively each file to be uploaded;
Acquiring unit, for obtaining the multiple file to be uploaded according to the file information;
Temporary storage location is temporarily stored into corresponding text for the acquiring unit each of to be obtained the file to be uploaded respectively
In part input control;
Uploading unit successively will be described using angular-upload plug-in unit for when receiving file uploading instructions
The temporary the multiple file to be uploaded of temporary storage location is uploaded to server.
Optionally, described device further include:
Binding unit, for being respectively that each file to be uploaded adds corresponding file input in the adding unit
After control, will add the click event of file to be uploaded respectively click event corresponding with each file input control into
Row binding.
Optionally, the acquiring unit includes:
Module is obtained, for when detecting the click event of addition file to be uploaded, according to the file information
Obtain the multiple file to be uploaded.
Optionally, the uploading unit includes:
Calling module, for using angular-upload plug-in unit recursive call text when receiving file uploading instructions
Part uploads interface;
Uploading module, the file called by the calling module upload interface successively by each text to be uploaded
Part is uploaded to server.
Optionally, described device further include:
Unit is deleted, for using angular-upload plug-in unit successively will be each described to be uploaded in the uploading unit
File is uploaded to before server, when receiving file deletion instruction, deletes the specified text to be uploaded of instruction to the file
The corresponding file input control of part carries out delete operation.
To achieve the goals above, according to the third aspect of the invention we, a kind of storage medium, the storage medium are provided
Program including storage, wherein equipment where controlling the storage medium in described program operation executes text described above
The method that part uploads.
To achieve the goals above, according to the fourth aspect of the invention, a kind of processor is provided, the processor is used for
Run program, wherein described program executes the method that file described above uploads when running.
By above-mentioned technical proposal, technical solution provided by the invention is at least had the advantage that
The method and device that a kind of file provided by the invention uploads, the present invention can be received in browser comprising multiple
After the file of the file information of file to be uploaded chooses instruction, respectively each file to be uploaded adds corresponding file input control
Each file to be uploaded is temporarily stored into corresponding text respectively after acquiring multiple files to be uploaded according to the file information by part
In part input control, when receiving file uploading instructions, multiple texts will be successively temporarily stored into using angular-upload plug-in unit
Multiple files to be uploaded in part input control are uploaded in server.With in the prior art, in acquisition, some is waited for browser
After transmitting file, the file to be uploaded is just uploaded to server using angular-upload plug-in unit and is compared, the present invention can be
After browser obtains multiple files to be uploaded, multiple files to be uploaded are kept in, when determining uploaded, are used
Multiple files to be uploaded are disposably uploaded to server by angular-upload plug-in unit, so that browser without obtaining every time
It after file to be uploaded, is interacted with server, and then improves browser and upload text using angular-upload plug-in unit
The upper transfer efficiency of part.
The above description is only an overview of the technical scheme of the present invention, in order to better understand the technical means of the present invention,
And it can be implemented in accordance with the contents of the specification, and in order to allow above and other objects of the present invention, feature and advantage can
It is clearer and more comprehensible, the followings are specific embodiments of the present invention.
Detailed description of the invention
By reading the following detailed description of the preferred embodiment, various other advantages and benefits are common for this field
Technical staff will become clear.The drawings are only for the purpose of illustrating a preferred embodiment, and is not considered as to the present invention
Limitation.And throughout the drawings, the same reference numbers will be used to refer to the same parts.In the accompanying drawings:
Fig. 1 shows the method flow diagram that a kind of file provided in an embodiment of the present invention uploads;
Fig. 2 shows the method flow diagrams that another file provided in an embodiment of the present invention uploads;
Fig. 3 shows the composition block diagram for the device that a kind of file provided in an embodiment of the present invention uploads;
Fig. 4 shows the composition block diagram for the device that another file provided in an embodiment of the present invention uploads.
Specific embodiment
Exemplary embodiments of the present disclosure are described in more detail below with reference to accompanying drawings.Although showing the disclosure in attached drawing
Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here
It is limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure
It is fully disclosed to those skilled in the art.
The embodiment of the invention provides a kind of methods that file uploads, as shown in Figure 1, this method is multiple in browser acquisition
After file to be uploaded, multiple files to be uploaded are kept in, when determining uploaded, use angular-upload plug-in unit
Multiple files to be uploaded are successively uploaded to server, browser is improved and uses transmitting file on angular-upload plug-in unit
Upper transfer efficiency, this method comprises:
101, it receives file and chooses instruction.
Wherein, it includes the corresponding the file information of multiple files to be uploaded that file, which is chosen in instruction, and file to be uploaded is user
The local file upload chosen according to actual needs, the corresponding the file information of file to be uploaded include but unlimited
Path etc. is locally stored in the filename of: file to be uploaded and file to be uploaded.
In embodiments of the present invention, operation is carried out in browser page as user and chooses the local text uploaded
When part, browser, which will be received, chooses instruction according to the file that user's actual need determines, wherein file is chosen in instruction and wrapped
Containing user choose file to be uploaded filename, the information such as path are locally stored, so as to subsequent basis receive it is multiple to
The file information of upper transmitting file obtains multiple files to be uploaded.
It 102, is respectively that each file to be uploaded adds corresponding file input control.
Wherein, file input control is for keeping in file to be uploaded, after browser acquires file to be uploaded, can incite somebody to action
File to be uploaded is temporarily stored into its corresponding file input control, by being respectively that each file to be uploaded adds corresponding file
Input control can make browser keep in multiple files to be uploaded, subsequent to use angular-upload plug-in unit disposably be more
A file to be uploaded uploads time server, so that browser without acquiring file to be uploaded every time, is just carried out with server
File to be uploaded is uploaded to server by interaction, and then is improved browser and used transmitting file on angular-upload plug-in unit
Upper transfer efficiency.
In embodiments of the present invention, when browser by step 101 receive file choose instruction after, respectively each use
The file to be uploaded that family is chosen adds corresponding file input control, for example, the file received is chosen in instruction comprising file
A, the file information of file B and file C, at this point, browser is respectively that these three files add corresponding file input control: text
Part input control A, file input control B and file input control C.
It needs to be illustrated, in actual application, in order to improve the usage experience of user, CSS can be used
(Cascading Style Sheets, cascading style sheets) pattern is hidden processing to the file input control of addition, thus
So that the file input control of browser addition can't be shown in browser page.In embodiments of the present invention, to using
Which kind of CSS style is hidden processing to file input control, without specifically limiting.
103, multiple files to be uploaded are obtained according to the file information, and be respectively temporarily stored into each file to be uploaded corresponding
In file input control.
In embodiments of the present invention, after respectively each file to be uploaded adds corresponding file input control, according to
File chooses the corresponding the file information of multiple files to be uploaded for including in instruction, obtains multiple files to be uploaded, and respectively will
Each file to be uploaded is temporarily stored into its corresponding file input control and is saved.
104, when receiving file uploading instructions, using angular-upload plug-in unit successively by multiple files to be uploaded
It is uploaded to server.
Wherein, angular-upload plug-in unit is to be pre-installed in browser, for inserting to server up transfer file
Part.
In embodiments of the present invention, when browser receives file uploading instructions, i.e. user determines the local text of selection
It, will be temporary in multiple file input controls using angular-upload plug-in unit preassembled in browser when part is uploaded
The multiple files to be uploaded deposited successively are uploaded in server, to realize through the primary interaction with server, by it is multiple to
Upper transmitting file is disposably uploaded to server.
The method that a kind of file provided in an embodiment of the present invention uploads, the embodiment of the present invention can receive packet in browser
After the file of the file information containing multiple files to be uploaded chooses instruction, respectively each file to be uploaded adds corresponding file
Each file to be uploaded is temporarily stored into pair by input control respectively after acquiring multiple files to be uploaded according to the file information
In the file input control answered, when receiving file uploading instructions, will successively it be temporarily stored into using angular-upload plug-in unit
Multiple files to be uploaded in multiple file input controls are uploaded in server.With in the prior art, browser is obtaining certain
After a file to be uploaded, the file to be uploaded is just uploaded to server using angular-upload plug-in unit and is compared, the present invention
Embodiment can keep in multiple files to be uploaded after browser obtains multiple files to be uploaded, when determination carries out
When biography, multiple files to be uploaded are disposably uploaded to server using angular-upload plug-in unit, so that browser is not necessarily to
It every time after obtaining file to be uploaded, is interacted with server, and then improves browser and use angular-upload
The upper transfer efficiency of transmitting file on plug-in unit.
Below in order to be explained in more detail, the embodiment of the invention provides the methods that another file uploads, especially
Multiple files to be uploaded are uploaded to the specific method of server using angular-upload plug-in unit and to deleting
The specific method that the file to be uploaded removed is handled, it is specific as shown in Fig. 2, this method comprises:
201, it receives file and chooses instruction.
Wherein, instruction is chosen about 201, reception file, the description of Fig. 1 corresponding part, the embodiment of the present invention can be referred to
It will not be described in great detail herein.
It 202, is respectively that each file to be uploaded adds corresponding file input control.
Wherein, corresponding file input control is added about 202, respectively each file to be uploaded, Fig. 1 pairs can be referred to
The description of part is answered, the embodiment of the present invention will not be described in great detail herein.
203, will add the click event of file to be uploaded respectively click event corresponding with each file input control into
Row binding.
Wherein, the click event for adding file to be uploaded is that user clicks in browser page for adding file to be uploaded
Addition button after the click event that triggers, when user is by clicking addition button to add the file to be uploaded chosen,
The click event for adding file to be uploaded will be triggered, browser will obtain the file to be uploaded being locally stored.
In embodiments of the present invention, after respectively each file to be uploaded adds corresponding file input control, will add
Adding the click file of file to be uploaded, click event corresponding with each file input control is bound respectively, that is, be will click on and added
The click event triggered after button click event corresponding with each file input control is added to be bound.Due to will add
The click event of file to be uploaded respectively bound by click event corresponding with each file input control, therefore works as user's point
When hitting addition button, the corresponding click event of each file input control will be triggered, so that browser is acquiring local
After multiple files to be uploaded of storage, each file to be uploaded directly can be temporarily stored into correspondence respectively without carrying out other operations
File input control in.
Need to be illustrated, in actual application, can will be added by for attribute of label label to
The click event of upper transmitting file respectively bound by click event corresponding with each file input control, can also pass through other
Mode realizes bindings, and the embodiment of the present invention is to this without specifically limiting.
204, when detecting the click event for adding file to be uploaded, multiple texts to be uploaded are obtained according to the file information
Part.
In embodiments of the present invention, clear when user is by clicking addition button to add the file to be uploaded chosen
Device of looking at will detect that user clicks the click event of the addition file to be uploaded triggered after addition button, at this point, browser meeting
Multiple files to be uploaded are obtained according to the file information.
205, each file to be uploaded is temporarily stored into corresponding file input control respectively.
In embodiments of the present invention, due to distinguishing the click event for adding file to be uploaded in abovementioned steps
Click event corresponding with each file input control is bound, and therefore, browser is detecting addition file to be uploaded
Click event, and after obtaining multiple files to be uploaded according to the file information, without carry out other operations can directly by each to
Upper transmitting file is temporarily stored into its corresponding file input control and is saved.
206, when receiving file deletion instruction, it is defeated that the specified corresponding file of file to be uploaded of instruction is deleted to file
Enter control and carries out delete operation.
It in embodiments of the present invention, will when some added file to be uploaded is deleted in user's expectation
It is operated in browser page and delete processing is carried out to the file to be uploaded that expectation is deleted, for example, being deleted by clicking expectation
The corresponding delete button of file to be uploaded etc., at this point, browser, which will receive file, deletes instruction, and file deletion is referred to
It enables the corresponding file input control of specified file to be uploaded carry out delete operation, is deleted so as to realize in browser side
Added file to be uploaded without interacting with server, and then is improved browser and is inserted using angular-upload
The upper transfer efficiency of transmitting file on part.
207, when receiving file uploading instructions, using angular-upload plug-in unit successively by multiple files to be uploaded
It is uploaded to server.
In embodiments of the present invention, when browser receives file uploading instructions, i.e. user determines the local text of selection
It, will be temporary in multiple file input controls using angular-upload plug-in unit preassembled in browser when part is uploaded
The multiple files to be uploaded deposited successively are uploaded in server.Below will to how using angular-upload plug-in unit successively will
Multiple files to be uploaded are uploaded to server and are described in detail.
(1) when receiving file uploading instructions, interface is uploaded using angular-upload plug-in unit recursive call file.
Wherein, file upload interface be browser inside API (Application Programming Interface,
Application programming interface), browser can upload interface by file and interact with server: browser is sent out to server
The request for passing file to be uploaded is served, after receiving the response message of server, file to be uploaded is uploaded in server.
In embodiments of the present invention, when browser receives file uploading instructions, i.e. user determines the local text of selection
When part is uploaded, browser will use preassembled angular-upload plug-in unit that file is called to upload interface, due to
A file to be uploaded can only be sent to server by calling file to upload interface every time using angular-upload plug-in unit, therefore
Browser needs to upload interface using angular-upload plug-in unit recursive call file, i.e., uploads interface to service by file
After device sends a file to be uploaded, just reuses angular-upload plug-in unit and file is called to upload interface, so as to
Complete being uploaded to all files to be uploaded in server for task.
(2) interface is uploaded by file and each file to be uploaded is successively uploaded to server.
In embodiments of the present invention, it is connect by step (1) using the upload of angular-upload plug-in unit recursive call file
Mouthful after, each file to be uploaded is successively uploaded to server, for example, file input control A, file input control B and
File input control C is kept in respectively file A, file B and file C, when browser receives file uploading instructions,
File is called to upload interface using angular-upload plug-in unit, uploading interface by file will keep in file input control A
File A be uploaded to server;After file A is uploaded to server, text is called again using angular-upload plug-in unit
Part uploads interface, uploads interface by file and the file B kept in file input control B is uploaded to server;By file B
After being uploaded to server, file is called to upload interface again using angular-upload plug-in unit, uploading interface by file will
The file C kept in file input control C is uploaded to server, to complete three files to be uploaded being uploaded to server
In task.
To achieve the goals above, according to another aspect of the present invention, the embodiment of the invention also provides a kind of storage Jie
Matter, the storage medium include the program of storage, wherein equipment where controlling the storage medium in described program operation is held
The method that row file described above uploads.
To achieve the goals above, according to another aspect of the present invention, the embodiment of the invention also provides a kind of processor,
The processor is for running program, wherein described program executes the method that file described above uploads when running.
Further, as the realization to method shown in above-mentioned Fig. 1 and Fig. 2, another embodiment of the present invention additionally provides one
The device that kind file uploads.The Installation practice is corresponding with preceding method embodiment, and to be easy to read, present apparatus embodiment is no longer
Detail content in preceding method embodiment is repeated one by one, it should be understood that the device in the present embodiment can correspond to
Realize the full content in preceding method embodiment.The device is applied to raising browser and uses on angular-upload plug-in unit
The upper transfer efficiency of transmitting file, specifically as shown in figure 3, the device includes:
Receiving unit 31 chooses instruction for receiving file, and it includes multiple files to be uploaded in instruction that the file, which is chosen,
Corresponding the file information;
Adding unit 32 adds corresponding file input control for respectively each file to be uploaded;
Acquiring unit 33, for obtaining the multiple file to be uploaded according to the file information;
Temporary storage location 34 is temporarily stored into corresponding text for will acquire each of the acquisition of unit 33 file to be uploaded respectively
In part input control;
Uploading unit 35 successively will be temporary using angular-upload plug-in unit for when receiving file uploading instructions
The temporary the multiple file to be uploaded of memory cell 34 is uploaded to server.
Further, as shown in figure 4, the device further include:
Binding unit 36, for being respectively that each file to be uploaded adds corresponding file input in adding unit 32
After control, will add the click event of file to be uploaded respectively click event corresponding with each file input control into
Row binding.
Further, as shown in figure 4, acquiring unit 33 includes:
Module 331 is obtained, for being believed according to the file when detecting the click event of the addition file to be uploaded
Breath obtains the multiple file to be uploaded.
Further, as shown in figure 4, uploading unit 35 includes:
Calling module 351, for using angular-upload plug-in unit recursive call when receiving file uploading instructions
File uploads interface;
Uploading module 352, the file called by calling module 351 uploads interface successively will be each described to be uploaded
File is uploaded to server.
Further, as shown in figure 4, the device further include:
Unit 37 is deleted, for using angular-upload plug-in unit successively will be each described to be uploaded in uploading unit 35
File is uploaded to before server, when receiving file deletion instruction, deletes the specified text to be uploaded of instruction to the file
The corresponding file input control of part carries out delete operation.
The device that a kind of file provided in an embodiment of the present invention uploads, the embodiment of the present invention can receive packet in browser
After the file of the file information containing multiple files to be uploaded chooses instruction, respectively each file to be uploaded adds corresponding file
Each file to be uploaded is temporarily stored into pair by input control respectively after acquiring multiple files to be uploaded according to the file information
In the file input control answered, when receiving file uploading instructions, will successively it be temporarily stored into using angular-upload plug-in unit
Multiple files to be uploaded in multiple file input controls are uploaded in server.With in the prior art, browser is obtaining certain
After a file to be uploaded, the file to be uploaded is just uploaded to server using angular-upload plug-in unit and is compared, the present invention
Embodiment can keep in multiple files to be uploaded after browser obtains multiple files to be uploaded, when determination carries out
When biography, multiple files to be uploaded are disposably uploaded to server using angular-upload plug-in unit, so that browser is not necessarily to
It every time after obtaining file to be uploaded, is interacted with server, and then improves browser and use angular-upload
The upper transfer efficiency of transmitting file on plug-in unit;Meanwhile the embodiment of the present invention user can be clicked after addition button the addition that triggers to
The click event of upper transmitting file respectively bound by click event corresponding with each file input control, so that browser is obtaining
After taking multiple files to be uploaded, each file to be uploaded directly can be temporarily stored into its corresponding file without carrying out other operations
It is saved in input control, and then improves and carry out temporary working efficiency to file to be uploaded;In addition to this, the present invention is real
Instruction can also be deleted according to file is received by applying example, and added file to be uploaded is carried out delete operation, so as to
It realizes and deletes added file to be uploaded in browser side, without interacting with server, and then improve browser
Use the upper transfer efficiency of transmitting file on angular-upload plug-in unit.
The device that the file uploads includes processor and memory, above-mentioned receiving unit, adding unit, acquiring unit,
Temporary storage location and uploading unit etc. store in memory as program unit, are executed by processor stored in memory
Above procedure unit realizes corresponding function.
Include kernel in processor, is gone in memory to transfer corresponding program unit by kernel.Kernel can be set one
Or more, the upper transfer efficiency of transmitting file on angular-upload plug-in unit is used by adjusting kernel parameter to improve browser.
Memory may include the non-volatile memory in computer-readable medium, random access memory (RAM) and/
Or the forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flashRAM), memory includes at least one storage
Chip.
The embodiment of the invention provides a kind of storage mediums, are stored thereon with program, real when which is executed by processor
The method that file described in any one of existing above embodiments uploads.
The embodiment of the invention provides a kind of processor, the processor is for running program, wherein described program operation
The method that file described in any one of Shi Zhihang above embodiments uploads.
The embodiment of the invention provides a kind of equipment, equipment include processor, memory and storage on a memory and can
The program run on a processor, processor perform the steps of when executing program
Reception file chooses instruction, and it includes the corresponding the file information of multiple files to be uploaded that the file, which is chosen in instruction,;
Respectively each file to be uploaded adds corresponding file input control;
The multiple file to be uploaded is obtained according to the file information, and respectively keeps in each file to be uploaded
In corresponding file input control;
When receiving file uploading instructions, using angular-upload plug-in unit successively by the multiple file to be uploaded
It is uploaded to server.
Further, after respectively each file to be uploaded adds corresponding file input control, the side
Method further include:
To add the click event of file to be uploaded respectively click event corresponding with each file input control into
Row binding.
Further, the multiple file to be uploaded is obtained according to the file information, comprising:
When detecting the click event of addition file to be uploaded, according to the file information obtain it is the multiple to
Upper transmitting file.
It further, successively will be each described using angular-upload plug-in unit when receiving file uploading instructions
File to be uploaded is uploaded to server, comprising:
When receiving file uploading instructions, interface is uploaded using angular-upload plug-in unit recursive call file;
Interface is uploaded by the file, and each file to be uploaded is successively uploaded to server.
Further, each file to be uploaded is successively being uploaded to server using angular-upload plug-in unit
Before, the method also includes:
When receiving file deletion instruction, it is defeated that the specified corresponding file of file to be uploaded of instruction is deleted to the file
Enter control and carries out delete operation.
Equipment herein can be server, PC, PAD, mobile phone etc..
Present invention also provides a kind of computer program products, when executing on data processing equipment, are adapted for carrying out just
The program code of beginningization there are as below methods step: it receives file and chooses instruction, the file is chosen in instruction comprising multiple to upper
The corresponding the file information of transmitting file;Respectively each file to be uploaded adds corresponding file input control;According to described
The file information obtains the multiple file to be uploaded, and each file to be uploaded is temporarily stored into corresponding file respectively and is inputted
In control;When receiving file uploading instructions, using angular-upload plug-in unit successively by the multiple file to be uploaded
It is uploaded to server.
It should be understood by those skilled in the art that, embodiments herein can provide as method, system or computer program
Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the application
Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the application, which can be used in one or more,
The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces
The form of product.
The application is referring to method, the process of equipment (system) and computer program product according to the embodiment of the present application
Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions
The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs
Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce
A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real
The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates,
Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or
The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting
Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or
The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one
The step of function of being specified in a box or multiple boxes.
In a typical configuration, calculating equipment includes one or more processors (CPU), input/output interface, net
Network interface and memory.
Memory may include the non-volatile memory in computer-readable medium, random access memory (RAM) and/
Or the forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flashRAM).Memory is computer-readable medium
Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method
Or technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data.
The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), moves
State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable
Programmable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM),
Digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or other magnetic storage devices
Or any other non-transmission medium, can be used for storage can be accessed by a computing device information.As defined in this article, it calculates
Machine readable medium does not include temporary computer readable media (transitory media), such as the data-signal and carrier wave of modulation.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability
It include so that the process, method, commodity or the equipment that include a series of elements not only include those elements, but also to wrap
Include other elements that are not explicitly listed, or further include for this process, method, commodity or equipment intrinsic want
Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including element
There is also other identical elements in process, method, commodity or equipment.
It will be understood by those skilled in the art that embodiments herein can provide as method, system or computer program product.
Therefore, complete hardware embodiment, complete software embodiment or embodiment combining software and hardware aspects can be used in the application
Form.It is deposited moreover, the application can be used to can be used in the computer that one or more wherein includes computer usable program code
The shape for the computer program product implemented on storage media (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.)
Formula.
The above is only embodiments herein, are not intended to limit this application.To those skilled in the art,
Various changes and changes are possible in this application.It is all within the spirit and principles of the present application made by any modification, equivalent replacement,
Improve etc., it should be included within the scope of the claims of this application.
Claims (10)
1. a kind of method that file uploads characterized by comprising
Reception file chooses instruction, and it includes the corresponding the file information of multiple files to be uploaded that the file, which is chosen in instruction,;
Respectively each file to be uploaded adds corresponding file input control;
The multiple file to be uploaded is obtained according to the file information, and is respectively temporarily stored into each file to be uploaded pair
In the file input control answered;
When receiving file uploading instructions, successively the multiple file to be uploaded is uploaded using angular-upload plug-in unit
To server.
2. the method according to claim 1, wherein corresponding in respectively each file addition to be uploaded
After file input control, the method also includes:
By the click event for adding file to be uploaded, click event corresponding with each file input control is tied up respectively
It is fixed.
3. according to the method described in claim 2, it is characterized in that, obtaining the multiple text to be uploaded according to the file information
Part, comprising:
When detecting the click event of the addition file to be uploaded, obtained according to the file information the multiple to be uploaded
File.
4. according to the method described in claim 3, it is characterized in that, using angular- when receiving file uploading instructions
Each file to be uploaded is successively uploaded to server by upload plug-in unit, comprising:
When receiving file uploading instructions, interface is uploaded using angular-upload plug-in unit recursive call file;
Interface is uploaded by the file, and each file to be uploaded is successively uploaded to server.
5. method according to claim 1-4, which is characterized in that using angular-upload plug-in unit successively
Before each file to be uploaded is uploaded to server, the method also includes:
When receiving file deletion instruction, the corresponding file of the specified file to be uploaded of instruction is deleted to the file and inputs control
Part carries out delete operation.
6. the device that a kind of file uploads characterized by comprising
Receiving unit chooses instruction for receiving file, and the file is chosen corresponding comprising multiple files to be uploaded in instruction
The file information;
Adding unit adds corresponding file input control for respectively each file to be uploaded;
Acquiring unit, for obtaining the multiple file to be uploaded according to the file information;
Temporary storage location, the acquiring unit each of is obtained the file to be uploaded for respectively, and to be temporarily stored into corresponding file defeated
Enter in control;
Uploading unit, for described will be successively kept in using angular-upload plug-in unit when receiving file uploading instructions
The temporary the multiple file to be uploaded of unit is uploaded to server.
7. device according to claim 6, which is characterized in that described device further include:
Binding unit, for being respectively that each file to be uploaded adds corresponding file input control in the adding unit
Later, by the click event for adding file to be uploaded, click event corresponding with each file input control is tied up respectively
It is fixed.
8. device according to claim 7, which is characterized in that the acquiring unit includes:
Module is obtained, for being obtained according to the file information when detecting the click event of the addition file to be uploaded
The multiple file to be uploaded.
9. a kind of storage medium, which is characterized in that the storage medium includes the program of storage, wherein run in described program
When control the storage medium where equipment perform claim require 1 side uploaded to the file described in any one of claim 5
Method.
10. a kind of processor, which is characterized in that the processor is for running program, wherein right of execution when described program is run
Benefit requires 1 method uploaded to the file described in any one of claim 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711042373.5A CN109729120A (en) | 2017-10-30 | 2017-10-30 | The method and device that file uploads |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711042373.5A CN109729120A (en) | 2017-10-30 | 2017-10-30 | The method and device that file uploads |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109729120A true CN109729120A (en) | 2019-05-07 |
Family
ID=66293998
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711042373.5A Pending CN109729120A (en) | 2017-10-30 | 2017-10-30 | The method and device that file uploads |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109729120A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103685413A (en) * | 2012-09-19 | 2014-03-26 | 腾讯科技(深圳)有限公司 | File uploading method and system |
US20150215400A1 (en) * | 2012-10-12 | 2015-07-30 | Tencent Technology (Shenzhen) Company Limited | File Upload Method And System |
CN104866313A (en) * | 2015-05-22 | 2015-08-26 | 国云科技股份有限公司 | Universal method for uploading files in JSP |
CN106502666A (en) * | 2016-10-18 | 2017-03-15 | 国云科技股份有限公司 | A kind of implementation method of high-freedom degree file uploading system |
CN107180107A (en) * | 2017-06-08 | 2017-09-19 | 山大鲁能信息科技有限公司 | Mobile phone accessory under Ionic frameworks uploads the method and system of select file |
-
2017
- 2017-10-30 CN CN201711042373.5A patent/CN109729120A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103685413A (en) * | 2012-09-19 | 2014-03-26 | 腾讯科技(深圳)有限公司 | File uploading method and system |
US20150215400A1 (en) * | 2012-10-12 | 2015-07-30 | Tencent Technology (Shenzhen) Company Limited | File Upload Method And System |
CN104866313A (en) * | 2015-05-22 | 2015-08-26 | 国云科技股份有限公司 | Universal method for uploading files in JSP |
CN106502666A (en) * | 2016-10-18 | 2017-03-15 | 国云科技股份有限公司 | A kind of implementation method of high-freedom degree file uploading system |
CN107180107A (en) * | 2017-06-08 | 2017-09-19 | 山大鲁能信息科技有限公司 | Mobile phone accessory under Ionic frameworks uploads the method and system of select file |
Non-Patent Citations (1)
Title |
---|
郝凡: "基于AngularJS+Bootstrap的多文件上传与管理", 《基于ANGULARJS+BOOTSTRAP的多文件上传与管理》 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CA3022570C (en) | Dynamic content and cloud based content within collaborative electronic content creation and management tools | |
CN106656920B (en) | Processing method, device, storage medium and the processor of HTTP service | |
CN105446750B (en) | The method and apparatus that WebApp starting runs, generates image file | |
CN105426223B (en) | Using loading method and device | |
CN112331235B (en) | Multimedia content editing control method and device, electronic equipment and storage medium | |
CN107844518B (en) | Method for evaluating download quantity of specified APP, data server, packaging platform and system | |
US11023558B1 (en) | Executing functions on-demand on a server utilizing web browsers | |
CN110213105A (en) | It is a kind of cross-platform micro- using creation method | |
CN111782184B (en) | Apparatus, method, apparatus and medium for performing a customized artificial intelligence production line | |
US10579229B2 (en) | Customizable media player framework | |
CN108874379B (en) | Page processing method and device | |
CN110507986A (en) | The treating method and apparatus of animation information | |
CN110110516A (en) | Log recording method, apparatus and system | |
CN109597627A (en) | A kind of component mounting method, device, storage medium and processor | |
CN105786476A (en) | Data processing method and system based on mobile client and server | |
CN113821307A (en) | Method, device and equipment for quickly importing virtual machine mirror image | |
CN109800005A (en) | A kind of hot update method of client and device | |
CN110019178A (en) | The correlating method and device of data | |
CN109558129A (en) | Progress bar implementation method and device | |
CN109729120A (en) | The method and device that file uploads | |
CN108089930A (en) | The sending method and device of data | |
CN109542401B (en) | Web development method and device, storage medium and processor | |
US11843679B2 (en) | Automated dependency management based on page components | |
CN109429100A (en) | A kind of storage method of page path, apparatus and system | |
CN106648565B (en) | Request sending method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB02 | Change of applicant information |
Address after: 100083 No. 401, 4th Floor, Haitai Building, 229 North Fourth Ring Road, Haidian District, Beijing Applicant after: BEIJING GRIDSUM TECHNOLOGY Co.,Ltd. Address before: 100086 Beijing city Haidian District Shuangyushu Area No. 76 Zhichun Road cuigongfandian 8 layer A Applicant before: BEIJING GRIDSUM TECHNOLOGY Co.,Ltd. |
|
CB02 | Change of applicant information | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190507 |
|
RJ01 | Rejection of invention patent application after publication |