CN111131360A - Multi-file uploading method and device - Google Patents
Multi-file uploading method and device Download PDFInfo
- Publication number
- CN111131360A CN111131360A CN201811291663.8A CN201811291663A CN111131360A CN 111131360 A CN111131360 A CN 111131360A CN 201811291663 A CN201811291663 A CN 201811291663A CN 111131360 A CN111131360 A CN 111131360A
- Authority
- CN
- China
- Prior art keywords
- file
- dragging
- list
- drag
- uploading
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/06—Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0484—Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
- G06F3/0486—Drag-and-drop
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The application discloses a multi-file uploading method and device. The method comprises the following steps: determining a file list of a plurality of files and a file node list of a plurality of file nodes, wherein the file nodes correspond to the plurality of files, and the file nodes in the file node list are bound with a dragging event for realizing a dragging function; in response to the dragging operation of the front-end equipment, a dragging source node and a dragging target node are determined from a file node list; determining a dragging source file corresponding to a dragging source node and a dragging target file corresponding to a dragging target node from a file list; changing the position of the dragged source file in the file list according to the dragging operation and the dragged target file; and uploading the multiple files according to the file list after the position is changed. By the method and the device, the problem that multiple files cannot be sequenced when the multiple files are uploaded in the related technology is solved.
Description
Technical Field
The application relates to the field of data processing, in particular to a multi-file uploading method and device.
Background
In the front-end project, multi-file uploading is the most basic component in various front-end projects, specifically, client data is packaged in a file form, sent to a server through a network protocol, analyzed at the server, and finally stored as a real file on a server hard disk.
In the related technology, element-ui is a set of Vue 2.0.0-based desktop component library prepared for developers, designers and product managers, and provides a basic multi-file uploading component, and in the multi-file uploading process, the order of designated files is a very common function, but the element-ui does not have a sequencing function of multi-file uploading.
Aiming at the problem that the multiple files cannot be sequenced when the multiple files are uploaded in the related technology, an effective solution is not provided at present.
Disclosure of Invention
The present application mainly aims to provide a method and an apparatus for uploading multiple files, so as to solve the problem that multiple files cannot be sorted when multiple files are uploaded in the related art.
To achieve the above object, according to one aspect of the present application, there is provided a multi-file uploading method. The method comprises the following steps: determining a file list of a plurality of files and a file node list of a plurality of file nodes, wherein the file nodes correspond to the plurality of files, and the file nodes in the file node list are bound with a dragging event for realizing a dragging function; determining a dragging source node and a dragging target node from the file node list in response to the dragging operation of the front-end equipment; determining a dragging source file corresponding to the dragging source node and a dragging target file corresponding to the dragging target node from the file list; changing the position of the dragged source file in the file list according to the dragging operation and the dragged target file; and uploading the multiple files according to the file list after the position is changed.
Optionally, according to the drag operation and the drag target file, changing the position of the drag source file in the file list includes at least one of: inserting the drag source file in front of the drag target file; inserting the drag source file after the drag target file; and exchanging the positions of the dragging source file and the dragging target file.
Optionally, in response to a drag operation of the front-end device, determining a drag source node and a drag target node from the file node list includes: and receiving a dragging operation which is triggered by the front-end equipment and used for dragging an icon corresponding to the dragged source file.
Optionally, before determining the file list of the plurality of files and the file node list of the plurality of file nodes, the method includes: and closing the automatic uploading function and the automatic display uploading result function of the uploading component, wherein the automatic uploading function of the uploading component is used for automatically uploading the plurality of files according to the file list, and the automatic display uploading result function of the uploading component is used for automatically displaying the plurality of automatically uploaded files.
Optionally, before changing the position of the dragged source file in the file list according to the dragging operation and the dragging target file, the method further includes: detecting whether the drag target file is positioned at the head or the tail of the file list; under the condition that the drag target file is detected to be positioned at the head or the tail of the file list, detecting whether the drag operation is to drag the drag source file to be before the head of the file list or after the tail of the file list; and sending out prompt information for prohibiting dragging when the dragging operation is detected to drag the dragged source file to the front of the head of the file list or the rear of the tail of the file list.
Optionally, the drag operation includes a plurality of different drag operations.
In order to achieve the above object, according to another aspect of the present application, there is provided a multi-file uploading apparatus. The device includes: the device comprises a first determining module, a second determining module and a control module, wherein the first determining module is used for determining a file list of a plurality of files and a file node list of a plurality of file nodes, the file nodes correspond to the files, and drag events for realizing a drag function are bound to the file nodes in the file node list; a second determining module, configured to determine, in response to a drag operation of a front-end device, a drag source node and a drag target node from the file node list; a third determining module, configured to determine, from the file list, a drag source file corresponding to the drag source node and a drag target file corresponding to the drag target node; the changing module is used for changing the position of the dragged source file in the file list according to the dragging operation and the dragged target file; and the uploading module is used for uploading the multiple files according to the file list after the position is changed.
Optionally, the apparatus further comprises: and the closing module is used for closing the automatic uploading function and the automatic display uploading result function of the uploading component, wherein the automatic uploading function of the uploading component is used for automatically uploading the files according to the file list, and the automatic display uploading result function of the uploading component is used for automatically displaying the automatically uploaded files.
In order to achieve the above object, according to another aspect of the present application, there is provided a storage medium including a stored program, wherein the program performs the method of any one of the above.
To achieve the above object, according to another aspect of the present application, there is provided a processor, wherein the processor is configured to execute a program, wherein the program executes to perform the method of any one of the above.
Through the application, the following steps are adopted: determining a file list of a plurality of files and a file node list of a plurality of file nodes, wherein the file nodes correspond to the plurality of files, and the file nodes in the file node list are bound with a dragging event for realizing a dragging function; determining a dragging source node and a dragging target node from the file node list in response to the dragging operation of the front-end equipment; determining a dragging source file corresponding to the dragging source node and a dragging target file corresponding to the dragging target node from the file list; changing the position of the dragged source file in the file list according to the dragging operation and the dragged target file; and uploading the multiple files according to the file list after the position is changed. The problem that multiple files cannot be sequenced when the multiple files are uploaded in the related technology is solved. Therefore, the effect of effectively sequencing the files in the file list through the dragging operation is achieved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this application, illustrate embodiments of the application and, together with the description, serve to explain the application and are not intended to limit the application. In the drawings:
fig. 1 is a flowchart of a multi-file uploading method provided according to an embodiment of the present application; and
fig. 2 is a schematic diagram of a multi-file uploading apparatus provided according to an embodiment of the present application.
Detailed Description
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be used. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
For convenience of description, some terms or expressions referred to in the embodiments of the present application are explained below:
the multi-file uploading is the most basic component in various front-end projects, encapsulates client data in a file form, sends the file form to a server through a network protocol, analyzes the data at the server, and finally stores the data as a real file on a hard disk of the server.
element-ui, a set of Vue 2.0.0-based desktop end component library prepared for developers, designers and product managers, provides a basic multi-file uploading component, and in the multi-file uploading process, the order of designated files is a very common function, but element-ui does not have the ordering function of multi-file uploading.
According to an embodiment of the application, a multi-file uploading method is provided.
Fig. 1 is a flowchart of a multi-file uploading method according to an embodiment of the present application. As shown in fig. 1, the method comprises the steps of:
step S101, determining a file list of a plurality of files and a file node list of a plurality of file nodes, wherein the file nodes correspond to the plurality of files, and the file nodes in the file node list are bound with dragging events for realizing a dragging function;
step S102, in response to the dragging operation of the front-end equipment, a dragging source node and a dragging target node are determined from a file node list;
step S103, determining a dragging source file corresponding to the dragging source node and a dragging target file corresponding to the dragging target node from the file list;
step S104, changing the position of the dragged source file in the file list according to the dragging operation and the dragged target file;
and step S105, uploading multiple files according to the file list after the position is changed.
Through the steps: determining a file list of a plurality of files and a file node list of a plurality of file nodes, wherein the file nodes correspond to the plurality of files, and the file nodes in the file node list are bound with a dragging event for realizing a dragging function; in response to the dragging operation of the front-end equipment, a dragging source node and a dragging target node are determined from a file node list; determining a dragging source file corresponding to a dragging source node and a dragging target file corresponding to a dragging target node from a file list; changing the position of the dragged source file in the file list according to the dragging operation and the dragged target file; and uploading the multiple files according to the file list after the position is changed. The problem that multiple files cannot be sequenced when the multiple files are uploaded in the related technology is solved. Therefore, the effect of effectively sequencing the files in the file list through the dragging operation is achieved.
The file list of the plurality of files is determined, the file list is a data framework for identifying the uploading sequence of the plurality of files, the uploading sequence is the default sequence of the file list, and may be the sequence of file generation or storage, or the sequence of file addition to the file list. The plurality of files are stored in different storage locations, and the file list may be a list of texts for identifying the files or a list in which the plurality of files are sorted. The file list can be displayed to a user through front-end equipment, and the front-end equipment can be equipment used for interacting with the user, such as a display screen, a computer and a smart phone. It should be noted that the order of the texts in the file list is not changeable, that is, the uploading order of the plurality of files cannot be adjusted according to the file list.
The order of the file nodes in the file node list can be adjusted, the file nodes correspond to the files in the file list, the correspondence relationship can be one-to-one correspondence, the file nodes comprise storage location information of the files in the corresponding file list, and the storage location information can be acquired through the file node list, so that the files corresponding to the file nodes can be acquired. When the file nodes in the file node list are reordered, the reordering can be realized according to the dragging function of the front-end device, because the operation of the front-end device is not the real operation in the file node list, a dragging event for realizing the dragging function is bound to the file nodes, and when the dragging event occurs on the front-end device, the file nodes in the file node list also correspondingly generate the dragging event. The dragging operation of the front-end equipment can be linked with the action of the file node list, so that preparation is made for adjusting the sequence of the files in the file list according to the dragging operation of the front-end equipment.
When the front-end device is dragged, the dragging operation may be dragging an icon representing a dragged source file to a target position, where the target position corresponds to the dragged target file. And reflecting the dragging event to the file node list, determining a dragging source node corresponding to the dragged source file icon and a dragging target node corresponding to the target position in the file node list, and acquiring the source file and the target file from the file list through the dragging source node and the dragging target node. After the storage positions in the dragging source file and the dragging target file are taken out, other files can be placed at the corresponding position of the dragging source file and the corresponding position of the dragging target file. The drag source file can also be inserted before or after the position of the drag target file in the file list.
Therefore, in the file node list, in response to the drag operation of the front-end device, the position of the dragged source file in the file node list can be changed according to the drag operation and the drag target file. The position of the drag source file in the file list can be determined by a specific update rule. There are many ways to change the position according to different needs of the user. For example, the area of the drag target file in the file list may be divided into three areas, before the drag target file, on the drag target file, and after the drag target file, the drag source file is placed in different areas, the sorting results are different, and the drag source file is placed before the drag target file, and then the drag source file is inserted into the adjacent position of the drag target file before the drag target file in the file list; placing the dragging source file on a dragging target file, and exchanging the positions of the dragging source file and the dragging target file in a file list; and after the dragging source file is placed in the dragging target file, the dragging source file is inserted into an adjacent position of the dragging target file behind the file list.
And finally, after the adjustment sequence of the files needing to be adjusted is finished, the file list with the changed sequence of the plurality of files is uploaded in a multi-file mode.
Optionally, in the multi-file uploading method provided in the embodiment of the present application, according to the drag operation and the drag target file, changing the position of the drag source file in the file list includes at least one of: inserting the dragging source file in front of the dragging target file; inserting the dragging source file into the dragging target file; and exchanging the positions of the drag source file and the drag target file.
Before the dragged source file is inserted into the dragged target file, the dragged source file may be placed at an adjacent position in the file list before the target file is dragged, a position of a file before the target file is dragged, other positions, or even the dragged source file may be placed at a position in the file list after the target file is dropped, and the specific instruction and result may be determined according to specific requirements by changing the corresponding relation. After the drag source file is inserted into the drag target file, the drag source file may be placed at an adjacent position in the file list after the drag target file is dragged. The swapping of the position of the drag source file and the drag target file may be performed only after the drag source file and the drag target file are determined.
Optionally, in the multi-file uploading method provided in the embodiment of the present application, before determining, in response to a drag operation of a front-end device, a drag source node and a drag target node from a file node list, the method includes: and receiving a dragging operation which is triggered by the front-end equipment and used for dragging an icon corresponding to the dragged source file.
Before determining the drag source node and the drag target node from the file node list in response to the drag operation of the front-end device, the drag operation of the front-end device needs to be received. On the front-end device, a display screen or a touch screen may be included, and a dragging operation may be implemented through a user interaction device, for example, a mouse, a keyboard, or a touch operation. On the display screen or the touch screen of the front-end device, the object of the drag operation may be an icon corresponding to a file in a file list.
Optionally, in the multi-file uploading method provided in the embodiment of the present application, before determining the file list of the plurality of files and the file node list of the plurality of file nodes, the method includes: and closing the automatic uploading function and the automatic uploading result displaying function of the uploading component, wherein the automatic uploading function of the uploading component is used for automatically uploading a plurality of files according to the file list, and the automatic uploading result displaying function of the uploading component is used for automatically displaying the automatically uploaded files.
The uploading component is used for automatically uploading a plurality of files according to the file list, and the automatic display uploading result function of the uploading component is to automatically display the automatically uploaded files. The upload component defaults to the above functions in some use cases, for example, defaults to an auto upload function and an auto display function in an element-ui use environment. In the above operation scenario, the sequence of the plurality of files that have been uploaded and displayed cannot be changed, and therefore, in this embodiment, before the sequence of the plurality of files in the file list is changed, the automatic upload function and the automatic display function of the upload component may be turned off first.
Optionally, in the multi-file uploading method provided in the embodiment of the present application, before changing a position of a drag source file in a file list according to a drag operation and a drag target file, the method further includes: detecting whether a drag target file is positioned at the head or the tail of the file list; under the condition that the dragging target file is detected to be positioned at the head or the tail of the file list, detecting whether the dragging operation is to drag the dragged source file to be in front of the head of the file list or behind the tail of the file list; and in the case that the dragging operation is detected to drag the dragged source file to the front of the head of the file list or the rear of the tail of the file list, sending out prompt information for prohibiting dragging.
When the drag operation is executed, because the corresponding range of the file list on the front-end device is limited, determining the icon corresponding to the source file to be dragged by the drag operation and the dragging position, and detecting whether the drag target file is located at the head or the tail of the file list, the drag target file may exceed the range of the file list when dragging the drag source file. Under the condition that the dragging target file is detected to be positioned at the head or the tail of the file list, detecting whether the dragging operation is to drag the dragged source file to be in front of the head of the file list or behind the tail of the file list; when the situation that the dragging operation is to drag the source file to the front of the head of the file list or to the back of the tail of the file list is detected, it is indicated that the position of the corresponding icon of the source file dragged corresponding to the dragging operation exceeds the range of the file list, a prompt message for prohibiting dragging can be sent out, the prompt message can be displayed through a display or played through a loudspeaker, and the prompt message can be prompted to a user by controlling the brightness of light or the flashing frequency.
Optionally, in the multi-file uploading method provided in the embodiment of the present application, the drag operation includes a plurality of different drag operations.
The dragging operation may be performed one at a time, and may be performed multiple times, or a plurality of dragging operations may be selected, and may be performed on a plurality of files at a time. In the above case of implementing a plurality of files at a time, the relative order between the plurality of files may not be changed or may be changed, and is determined according to the specific requirements of the user.
It should be noted that this embodiment also provides an ELEMENT-UI multi-file upload, drag and sort method, which is an optional implementation and is described in detail below.
The existing element-ui does not provide a complete ordering scheme for the multi-file upload component. Aiming at the defects, the invention provides an optimization scheme based on element-ui multi-file uploading, and corresponding sequencing is completed by dragging the files in a multi-file list.
The overall idea of the scheme is as follows: the method comprises the following steps of uploading 'a display result on the surface' (an uploading function and a display list) by using element-ui multi-file, adding a function of dragging and sequencing, and specifically comprising the following steps:
1. setting a basic element-ui uploading component, setting automatic uploading as false, otherwise, automatically uploading without adjusting the sequence after selecting the file, and simultaneously setting the show-file List as false, not allowing the uploading component to automatically display the uploading result;
2. following the upload component, a piece of code is provided whose rendering results allow the upload component to automatically display the upload result with substantially the same automatically generated result, so we abandon this process of automatic generation because we need to make changes in this piece of code, see the following italic underlined part.
The above file list fileList is a file list data model that we upload, and is represented as follows (suffix of file name is png):
document 1: png of icon _ unconjugate
Document 2: png of icon _ con
The drag command v-dragging is a preset command, which can be written by the user, or can be an externally introduced drag command (such as awe-dnd), and is used for binding drag events for each item in the list and exchanging data in the data model during dragging.
A detailed procedure for v-drawing is given here:
1) storing rendered node information (more position information than the file list) by using an array file node list filenodeList, binding a drag event to a currently rendered file node list item by a colleague, and allowing dragging in a file list area;
2) when a file is dragged to a specified position, the data information of the originally corresponding dragged file node sourceNode and the specified position file node targetNode can be obtained from the file node list fileeNodeList, and then the corresponding data (the dragged source file sourceData and the dragged target file targetData) of the two nodes are found in the file list fileList;
3) and inserting sourceData before targetData, so that the data vo is refreshed, the file list is redrawn, the dragging and sorting operation is completed, and the finally needed result is that the fileList is directly used during uploading values.
3. Therefore, after the steps are carried out, the file list can be dragged and sorted randomly, and finally, when the result is uploaded, the value is directly taken from the fileList.
The technical scheme of the embodiment has the following beneficial effects: the embodiment provides an element-ui multi-file uploading optimization scheme, which can effectively realize the function of multi-file sequencing; the implementation mode is simple, the logic is clear, the source code of the element-ui is not required to be changed, and the increased code amount is small.
The multi-file uploading method provided by the embodiment of the application determines a file list of a plurality of files and a file node list of a plurality of file nodes, wherein the file nodes correspond to the plurality of files, and the file nodes in the file node list are bound with dragging events for realizing a dragging function; in response to the dragging operation of the front-end equipment, a dragging source node and a dragging target node are determined from a file node list; determining a dragging source file corresponding to a dragging source node and a dragging target file corresponding to a dragging target node from a file list; changing the position of the dragged source file in the file list according to the dragging operation and the dragged target file; and multi-file uploading is carried out according to the file list after the position is changed, so that the problem that the multi-file cannot be sequenced when multi-file uploading is carried out in the related technology is solved. Therefore, the effect of effectively sequencing the files in the file list through the dragging operation is achieved.
It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowcharts, in some cases, the steps illustrated or described may be performed in an order different than presented herein.
The embodiment of the present application further provides a multi-file uploading apparatus, and it should be noted that the multi-file uploading apparatus of the embodiment of the present application may be used to execute the method for multi-file uploading provided by the embodiment of the present application. The following describes a multi-file uploading apparatus provided in an embodiment of the present application.
Fig. 2 is a schematic diagram of a multi-file uploading apparatus according to an embodiment of the present application. As shown in fig. 2, the apparatus includes: a first determination module 202, a second determination module 204, a third determination module 206, a change module 208, and an upload module 210, which are described in detail below.
A first determining module 202, configured to determine a file list of multiple files and a file node list of multiple file nodes, where the file nodes correspond to the multiple files, and a drag event for implementing a drag function is bound to a file node in the file node list; a second determining module 204, connected to the first determining module 202, configured to determine, in response to a drag operation of a front-end device, a drag source node and a drag target node from a file node list; a third determining module 206, connected to the second determining module 204, configured to determine, from the file list, a dragged source file corresponding to the dragged source node and a dragged target file corresponding to the dragged target node; a changing module 208, connected to the third determining module 206, configured to change a position of the dragged source file in the file list according to the dragging operation and the dragged target file; and an uploading module 210, connected to the changing module 208, for uploading multiple files according to the file list after changing the position.
Optionally, in the multi-file uploading apparatus provided in the embodiment of the present application, the apparatus further includes: and the closing module is used for closing the automatic uploading function and the automatic uploading result displaying function of the uploading component, wherein the automatic uploading function of the uploading component is used for automatically uploading the plurality of files according to the file list, and the automatic uploading result displaying function of the uploading component is used for automatically displaying the plurality of automatically uploaded files.
Optionally, in the multi-file uploading apparatus provided in the embodiment of the present application, the change module includes at least one of: the first dragging module is used for inserting the dragging source file in front of the dragging target file; the second dragging module is used for inserting the dragged source file into the dragged target file; and the third dragging module is used for exchanging the positions of the dragged source file and the dragged target file.
Optionally, in the multi-file uploading apparatus provided in the embodiment of the present application, the apparatus further includes: the receiving module is used for receiving a dragging operation which is triggered by the front-end equipment and used for dragging an icon corresponding to a dragged source file.
Optionally, in the multi-file uploading apparatus provided in the embodiment of the present application, the apparatus further includes: the first detection module is used for detecting whether the drag target file is positioned at the head or the tail of the file list; the second detection module is used for detecting whether the dragging operation is to drag the dragged source file to the front of the head of the file list or to the back of the tail of the file list under the condition that the dragging target file is detected to be positioned at the head or the tail of the file list; and the prompting module is used for sending prompting information for prohibiting dragging when the dragging operation is detected to be before the head of the file list or after the tail of the file list.
Optionally, in the multi-file uploading device provided in the embodiment of the present application, the drag operation includes a plurality of different drag operations.
The multi-file uploading device provided by the embodiment of the application determines a file list of a plurality of files and a file node list of a plurality of file nodes through the first determining module 202, wherein the file nodes correspond to the plurality of files, and the file nodes in the file node list are bound with a dragging event for realizing a dragging function; the second determining module 204 determines a dragging source node and a dragging target node from the file node list in response to a dragging operation of the front-end device; the third determining module 206 determines a dragging source file corresponding to the dragging source node and a dragging target file corresponding to the dragging target node from the file list; the changing module 208 changes the position of the dragged source file in the file list according to the dragging operation and the dragged target file; the uploading module 210 uploads the multiple files according to the file list after the position is changed, so that the problem that the multiple files cannot be sorted when the multiple files are uploaded in the related art is solved, and the effect of effectively sorting the multiple files in the file list through the dragging operation is achieved.
The multi-file uploading device comprises a processor and a memory, wherein the first determining module 202, the second determining module 204, the third determining module 206, the changing module 208, the uploading module 210 and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can be set to be one or more than one, the problem that multiple files cannot be sequenced when the multiple files are uploaded in the related technology is solved by adjusting kernel parameters, and therefore the effect of effectively sequencing the multiple files in the file list through dragging operation is achieved.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
An embodiment of the present invention provides a storage medium on which a program is stored, the program implementing the multi-file uploading method when executed by a processor.
The embodiment of the invention provides a processor, which is used for running a program, wherein the multi-file uploading method is executed when the program runs.
The embodiment of the invention provides equipment, which comprises a processor, a memory and a program which is stored on the memory and can run on the processor, wherein the processor executes the program and realizes the following steps: determining a file list of a plurality of files and a file node list of a plurality of file nodes, wherein the file nodes correspond to the plurality of files, and the file nodes in the file node list are bound with a dragging event for realizing a dragging function; in response to the dragging operation of the front-end equipment, a dragging source node and a dragging target node are determined from a file node list; determining a dragging source file corresponding to a dragging source node and a dragging target file corresponding to a dragging target node from a file list; changing the position of the dragged source file in the file list according to the dragging operation and the dragged target file; and uploading the multiple files according to the file list after the position is changed.
Optionally, according to the dragging operation and the dragging target file, changing the position of the dragging source file in the file list includes at least one of the following: inserting the dragging source file in front of the dragging target file; inserting the dragging source file into the dragging target file; and exchanging the positions of the drag source file and the drag target file.
Optionally, in response to a drag operation of the front-end device, determining a drag source node and a drag target node from the file node list includes: and receiving a dragging operation which is triggered by the front-end equipment and used for dragging an icon corresponding to the dragged source file.
Optionally, before determining the file list of the plurality of files and the file node list of the plurality of file nodes, the method includes: and closing the automatic uploading function and the automatic uploading result displaying function of the uploading component, wherein the automatic uploading function of the uploading component is used for automatically uploading a plurality of files according to the file list, and the automatic uploading result displaying function of the uploading component is used for automatically displaying the automatically uploaded files.
Optionally, before changing the position of the dragged source file in the file list according to the dragging operation and the dragged target file, the method further includes: detecting whether a drag target file is positioned at the head or the tail of the file list; under the condition that the dragging target file is detected to be positioned at the head or the tail of the file list, detecting whether the dragging operation is to drag the dragged source file to be in front of the head of the file list or behind the tail of the file list; and in the case that the dragging operation is detected to drag the dragged source file to the front of the head of the file list or the rear of the tail of the file list, sending out prompt information for prohibiting dragging.
Optionally, the drag operation includes a plurality of different drag operations.
The device herein may be a server, a PC, a PAD, a mobile phone, etc.
The present application further provides a computer program product adapted to perform a program for initializing the following method steps when executed on a data processing device: determining a file list of a plurality of files and a file node list of a plurality of file nodes, wherein the file nodes correspond to the plurality of files, and the file nodes in the file node list are bound with a dragging event for realizing a dragging function; in response to the dragging operation of the front-end equipment, a dragging source node and a dragging target node are determined from a file node list; determining a dragging source file corresponding to a dragging source node and a dragging target file corresponding to a dragging target node from a file list; changing the position of the dragged source file in the file list according to the dragging operation and the dragged target file; and uploading the multiple files according to the file list after the position is changed.
Optionally, according to the dragging operation and the dragging target file, changing the position of the dragging source file in the file list includes at least one of the following: inserting the dragging source file in front of the dragging target file; inserting the dragging source file into the dragging target file; and exchanging the positions of the drag source file and the drag target file.
Optionally, in response to a drag operation of the front-end device, determining a drag source node and a drag target node from the file node list includes: and receiving a dragging operation which is triggered by the front-end equipment and used for dragging an icon corresponding to the dragged source file.
Optionally, before determining the file list of the plurality of files and the file node list of the plurality of file nodes, the method includes: and closing the automatic uploading function and the automatic uploading result displaying function of the uploading component, wherein the automatic uploading function of the uploading component is used for automatically uploading a plurality of files according to the file list, and the automatic uploading result displaying function of the uploading component is used for automatically displaying the automatically uploaded files.
Optionally, before changing the position of the dragged source file in the file list according to the dragging operation and the dragged target file, the method further includes: detecting whether a drag target file is positioned at the head or the tail of the file list; under the condition that the dragging target file is detected to be positioned at the head or the tail of the file list, detecting whether the dragging operation is to drag the dragged source file to be in front of the head of the file list or behind the tail of the file list; and in the case that the dragging operation is detected to drag the dragged source file to the front of the head of the file list or the rear of the tail of the file list, sending out prompt information for prohibiting dragging.
Optionally, the drag operation includes a plurality of different drag operations.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims (10)
1. A multi-file uploading method is characterized by comprising the following steps:
determining a file list of a plurality of files and a file node list of a plurality of file nodes, wherein the file nodes correspond to the plurality of files, and the file nodes in the file node list are bound with a dragging event for realizing a dragging function;
determining a dragging source node and a dragging target node from the file node list in response to the dragging operation of the front-end equipment;
determining a dragging source file corresponding to the dragging source node and a dragging target file corresponding to the dragging target node from the file list;
changing the position of the dragged source file in the file list according to the dragging operation and the dragged target file;
and uploading the multiple files according to the file list after the position is changed.
2. The method according to claim 1, wherein, according to the drag operation and the drag target file, changing the position of the drag source file in the file list comprises at least one of:
inserting the drag source file in front of the drag target file;
inserting the drag source file after the drag target file;
and exchanging the positions of the dragging source file and the dragging target file.
3. The method of claim 1, wherein before determining the drag source node and the drag target node from the file node list in response to a drag operation of a front-end device, the method comprises:
and receiving a dragging operation which is triggered by the front-end equipment and used for dragging an icon corresponding to the dragged source file.
4. The method of claim 1, prior to determining the file list of the plurality of files and the file node list of the plurality of file nodes, comprising:
and closing the automatic uploading function and the automatic display uploading result function of the uploading component, wherein the automatic uploading function of the uploading component is used for automatically uploading the plurality of files according to the file list, and the automatic display uploading result function of the uploading component is used for automatically displaying the plurality of automatically uploaded files.
5. The method according to claim 1, before changing a position of the drag source file in the file list according to the drag operation and the drag target file, further comprising:
detecting whether the drag target file is positioned at the head or the tail of the file list;
under the condition that the drag target file is detected to be positioned at the head or the tail of the file list, detecting whether the drag operation is to drag the drag source file to be before the head of the file list or after the tail of the file list;
and sending out prompt information for prohibiting dragging when the dragging operation is detected to drag the dragged source file to the front of the head of the file list or the rear of the tail of the file list.
6. The method according to any one of claims 1 to 5,
the drag operation includes a plurality of different drag operations.
7. A multi-file uploading apparatus, comprising:
the device comprises a first determining module, a second determining module and a control module, wherein the first determining module is used for determining a file list of a plurality of files and a file node list of a plurality of file nodes, the file nodes correspond to the files, and drag events for realizing a drag function are bound to the file nodes in the file node list;
a second determining module, configured to determine, in response to a drag operation of a front-end device, a drag source node and a drag target node from the file node list;
a third determining module, configured to determine, from the file list, a drag source file corresponding to the drag source node and a drag target file corresponding to the drag target node;
the changing module is used for changing the position of the dragged source file in the file list according to the dragging operation and the dragged target file;
and the uploading module is used for uploading the multiple files according to the file list after the position is changed.
8. The apparatus of claim 7, further comprising:
and the closing module is used for closing the automatic uploading function and the automatic display uploading result function of the uploading component, wherein the automatic uploading function of the uploading component is used for automatically uploading the files according to the file list, and the automatic display uploading result function of the uploading component is used for automatically displaying the automatically uploaded files.
9. A storage medium, characterized in that the storage medium comprises a stored program, wherein the program performs the method of any one of claims 1 to 6.
10. A processor, characterized in that the processor is configured to run a program, wherein the program when running performs the method of any of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811291663.8A CN111131360B (en) | 2018-10-31 | 2018-10-31 | Multi-file uploading method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811291663.8A CN111131360B (en) | 2018-10-31 | 2018-10-31 | Multi-file uploading method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111131360A true CN111131360A (en) | 2020-05-08 |
CN111131360B CN111131360B (en) | 2023-02-21 |
Family
ID=70494738
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811291663.8A Active CN111131360B (en) | 2018-10-31 | 2018-10-31 | Multi-file uploading method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111131360B (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104123080A (en) * | 2014-07-15 | 2014-10-29 | 东莞市微云***科技有限公司 | Automation file dragging method |
CN104426949A (en) * | 2013-08-28 | 2015-03-18 | 鸿富锦精密工业(深圳)有限公司 | Multi-file uploading method and system |
CN106855769A (en) * | 2015-12-08 | 2017-06-16 | 北京国双科技有限公司 | Data Comparison method and apparatus |
CN106921682A (en) * | 2015-12-24 | 2017-07-04 | 百度在线网络技术(北京)有限公司 | File uploading method and device |
CN107133319A (en) * | 2017-05-03 | 2017-09-05 | 努比亚技术有限公司 | A kind of method, device and the computer-readable recording medium of efficient adjustment order |
CN107294835A (en) * | 2016-04-11 | 2017-10-24 | 阿里巴巴集团控股有限公司 | Document sending method and device in a kind of instant messaging |
CN107391002A (en) * | 2017-07-20 | 2017-11-24 | 上海金大师网络科技有限公司 | A kind of transparent floating can pull list generation method and system |
-
2018
- 2018-10-31 CN CN201811291663.8A patent/CN111131360B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104426949A (en) * | 2013-08-28 | 2015-03-18 | 鸿富锦精密工业(深圳)有限公司 | Multi-file uploading method and system |
CN104123080A (en) * | 2014-07-15 | 2014-10-29 | 东莞市微云***科技有限公司 | Automation file dragging method |
CN106855769A (en) * | 2015-12-08 | 2017-06-16 | 北京国双科技有限公司 | Data Comparison method and apparatus |
CN106921682A (en) * | 2015-12-24 | 2017-07-04 | 百度在线网络技术(北京)有限公司 | File uploading method and device |
CN107294835A (en) * | 2016-04-11 | 2017-10-24 | 阿里巴巴集团控股有限公司 | Document sending method and device in a kind of instant messaging |
CN107133319A (en) * | 2017-05-03 | 2017-09-05 | 努比亚技术有限公司 | A kind of method, device and the computer-readable recording medium of efficient adjustment order |
CN107391002A (en) * | 2017-07-20 | 2017-11-24 | 上海金大师网络科技有限公司 | A kind of transparent floating can pull list generation method and system |
Non-Patent Citations (1)
Title |
---|
啥啥啥娜娜: "vue+element-ui项目上传图片组件", 《简书》 * |
Also Published As
Publication number | Publication date |
---|---|
CN111131360B (en) | 2023-02-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11150790B2 (en) | Application interface management method and apparatus | |
US9298348B2 (en) | Mobile device and method for providing widgets | |
CN107168879B (en) | Method and device for generating test report of centralized configuration management system | |
CN107608609B (en) | Event object sending method and device | |
CN112947969B (en) | Page off-screen rendering method, device, equipment and readable medium | |
CN112084488A (en) | Application authority management method, device and system | |
CN109189384A (en) | A kind of multiplexing method and device of code | |
CN110347321A (en) | A kind of formation gathering method and device | |
CN114185874A (en) | Big data based modeling method and device, development framework and equipment | |
US11347382B2 (en) | Method of automatically switching mode of work screen of digital content authoring tool | |
CN109683887A (en) | A kind of construction method and device for supporting the customized web project of multi-scheme | |
CN111131360B (en) | Multi-file uploading method and device | |
CN106610830B (en) | Page element drag-and-drop method and device | |
CN110968377B (en) | Interface display processing method and device | |
CN112579066A (en) | Chart display method and device, storage medium and equipment | |
CN112560403A (en) | Text processing method and device and electronic equipment | |
CN109271220A (en) | Method, calculating equipment and the storage medium that the page returns are controlled by gesture operation | |
CN110215702B (en) | Method and device for controlling grouping in game | |
CN110969461B (en) | Method and device for processing public number information, storage medium and processor | |
WO2014093242A1 (en) | Modification of file graphic appearance within a collection canvas | |
CN111464577B (en) | Equipment control method and device | |
CN110019034A (en) | Formfile loading method and device | |
CN112749282A (en) | Knowledge graph display method, device, equipment and storage medium | |
CN105808318B (en) | Information processing method and electronic equipment | |
CN111651194B (en) | iOS-based adaptation 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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |