CN114390039A - File uploading and downloading method and system - Google Patents
File uploading and downloading method and system Download PDFInfo
- Publication number
- CN114390039A CN114390039A CN202111441017.7A CN202111441017A CN114390039A CN 114390039 A CN114390039 A CN 114390039A CN 202111441017 A CN202111441017 A CN 202111441017A CN 114390039 A CN114390039 A CN 114390039A
- Authority
- CN
- China
- Prior art keywords
- file
- uploading
- user
- client
- files
- 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
- 238000000034 method Methods 0.000 title claims abstract description 62
- 238000012545 processing Methods 0.000 claims abstract description 16
- 238000012795 verification Methods 0.000 claims abstract description 15
- 230000006870 function Effects 0.000 claims description 11
- 230000008569 process Effects 0.000 claims description 10
- 238000004590 computer program Methods 0.000 claims description 9
- 238000004140 cleaning Methods 0.000 claims description 2
- 230000005540 biological transmission Effects 0.000 description 8
- 238000010586 diagram Methods 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 5
- 230000008901 benefit Effects 0.000 description 3
- 230000008859 change Effects 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 230000003993 interaction Effects 0.000 description 3
- 238000005065 mining Methods 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 238000013467 fragmentation Methods 0.000 description 2
- 238000006062 fragmentation reaction Methods 0.000 description 2
- 230000002452 interceptive effect Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000007792 addition Methods 0.000 description 1
- 230000004075 alteration Effects 0.000 description 1
- 238000000354 decomposition reaction Methods 0.000 description 1
- 230000014509 gene expression Effects 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000005055 memory storage Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 230000006798 recombination Effects 0.000 description 1
- 238000005215 recombination Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
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]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The embodiment of the invention discloses a method and a system for uploading and downloading files, wherein the method comprises the following steps: responding to a file uploading instruction initiated in an interface by a user by a client API, popping up a file selection box through a browser, and allowing the user to select files of specified file types and quantity in configuration information for uploading; the client API slices files according with the specified file types and the specified file numbers one by one according to the configuration information, and sends the files slice by slice and attached with a file MD5 code, an uploading identification instruction and user information to the file server; after uploading all the file slices, the client API sends a file slice merging instruction, a file MD5 code and an uploading identification instruction to the file server; and the file server side receives the uploading identification instruction, performs verification processing according to the configuration information, stores the slice data and the user information according to the file MD5 code, and completes slice combination into a file storage and clears the slice data when receiving a file slice combination instruction of the client side.
Description
Technical Field
The present invention relates to the field of file storage technologies, and in particular, to a method and a system for uploading and downloading files.
Background
File transmission in an information system is an indispensable part, the use experience of a user is influenced by the speed of file transmission, and files containing malicious codes cause damage and loss to the system and even the benefits of the user. However, the existing file uploading and downloading methods have the problems of low transmission efficiency, incapability of ensuring file consistency, low system security and the like.
Disclosure of Invention
The invention is provided for solving the technical problems that the prior file uploading and downloading method has low transmission efficiency, can not ensure the consistency of files and has low system security. The embodiment of the invention provides a file uploading and downloading method and system.
According to an aspect of an embodiment of the present invention, a method for uploading and downloading a file is provided, where the method includes:
responding to a file uploading instruction initiated in a client API interface by a user through a browser by a client API, popping up a file selection box through the browser, and allowing the user to select files of the specified file type and number in the configuration information for uploading;
the client API checks the file type and the file number before uploading the files according to the configuration information, and performs file slicing on the files which accord with the specified file type and the file number one by one;
the client API transmits and attaches the MD5 codes of the files, uploading identification instructions and user information to the file server side one by one after slicing the files;
after uploading all the file slices, the client API sends a file slice merging instruction, a file MD5 code and an uploading identification instruction to the file server;
the file server receives the uploading identification command, carries out verification processing according to the configuration information and stores the slice data and the user information according to the file MD5 code;
and when the file server side receives a file slice merging instruction of the client side, the file server side completes slice merging to file storage and clears slice data.
Optionally, the method further comprises: and the client API simultaneously shows the file uploading progress on the interface.
Optionally, the method further comprises: and for the files with the types and the number exceeding the specified number in the non-configuration information, the client API refuses to upload and pops up prompt information through the browser.
Optionally, the method further comprises: in the file uploading process, the file server side uploads or merges the file slices and feeds back the storage state information to the client side API.
Optionally, the method further comprises:
when a user downloads a file through a browser, a client API sends a file link and user information to a file server;
after the file server side passes the user verification, a breakpoint resume function is started to provide file downloading service, and a client side API pops up a file storage dialog box for the user to select a file downloading storage position.
According to another aspect of the embodiments of the present invention, there is provided a file uploading and downloading system, including: client API and file server side, wherein
The client API is used for responding to a file uploading instruction initiated in a client API interface by a user through a browser, popping up a file selection box through the browser, and allowing the user to select files with specified file types and quantity in the configuration information for uploading;
the client API is also used for verifying the file type and the file number before uploading the files according to the configuration information and slicing the files which accord with the specified file type and the file number one by one;
the client API is also used for sending the files which are sliced according to the files and attached with the MD5 codes, the uploading identification instructions and the user information one by one to the file server;
the client API is also used for sending the file slice merging instruction, the file MD5 code and the uploading identification instruction to the file server side after all the file slices are uploaded;
the file server side is used for receiving the uploading identification instruction, carrying out verification processing according to the configuration information and storing the slice data and the user information according to a file MD5 code;
and the file server is also used for completing the combination of the slices into a file and storing and cleaning the slice data when receiving a file slice combination instruction of the client.
Optionally, the client API is further configured to simultaneously expose the file upload progress on the interface.
Optionally, for files of specified file types and exceeding specified number in the non-configuration information, the client API is further configured to refuse to upload and pop up prompt information through the browser.
Optionally, in the file uploading process, the file server is further configured to upload or merge file slices and store state information and feed back the file slices or the merged file slices to the client API.
Optionally, when the user downloads the file through the browser, the client API is further configured to send the file link and the user information to the file server;
the file server side is further used for starting a breakpoint resume function to provide file downloading service after user verification is passed, and the client side API is further used for popping up a file storage dialog box for a user to select a storage position for downloading a file.
According to still another aspect of an embodiment of the present invention, there is provided an electronic apparatus including: a processor; for storing the processor-executable instructions; the processor is configured to read the executable instructions from the memory and execute the instructions to implement the method according to any of the above embodiments of the present invention.
According to yet another aspect of embodiments of the present invention, there is provided a computer-readable storage medium storing a computer program for executing the method according to any one of the above-mentioned embodiments of the present invention.
Therefore, the file uploading and downloading method provided by the invention provides the easy-to-operate and interactive friendly client API for the user, limits the type of the file capable of being uploaded through the configuration information, and provides the file slice uploading and breakpoint continuous downloading. And before uploading the file and during downloading the file, checking and processing. The browser sends the uploading or downloading instruction to the server side, the server side carries out verification and processing through the configuration information, and file storage is completed according to the received instruction and a breakpoint resume function is started to provide downloading service. The invention adopts the file fragmentation technology to improve the transmission efficiency. And the MD5 technology is adopted to ensure the consistency of the files. Through the configuration and setting of the file types, the uploaded file types are controllable, and the system safety is improved. The client is easy to operate and friendly to interaction. Therefore, the file uploading and downloading method provided by the invention achieves the technical effects of improving the transmission efficiency and ensuring the file consistency and the system safety.
The technical solution of the present invention is further described in detail by the accompanying drawings and embodiments.
Drawings
The above and other objects, features and advantages of the present invention will become more apparent by describing in more detail embodiments of the present invention with reference to the attached drawings. The accompanying drawings are included to provide a further understanding of the embodiments of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the principles of the invention and not to limit the invention. In the drawings, like reference numbers generally represent like parts or steps.
Fig. 1 is a flowchart illustrating a file uploading and downloading method according to an exemplary embodiment of the present invention;
fig. 2 is a schematic structural diagram of a file uploading and downloading system according to an exemplary embodiment of the present invention;
fig. 3 is a structure of an electronic device according to an exemplary embodiment of the present invention.
Detailed Description
Hereinafter, example embodiments according to the present invention will be described in detail with reference to the accompanying drawings. It is to be understood that the described embodiments are merely a subset of embodiments of the invention and not all embodiments of the invention, with the understanding that the invention is not limited to the example embodiments described herein.
It should be noted that: the relative arrangement of the components and steps, the numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present invention unless specifically stated otherwise.
It will be understood by those of skill in the art that the terms "first," "second," and the like in the embodiments of the present invention are used merely to distinguish one element, step, device, module, or the like from another element, and do not denote any particular technical or logical order therebetween.
It should also be understood that in embodiments of the present invention, "a plurality" may refer to two or more and "at least one" may refer to one, two or more.
It is also to be understood that any reference to any component, data, or structure in the embodiments of the invention may be generally understood as one or more, unless explicitly defined otherwise or stated to the contrary hereinafter.
In addition, the term "and/or" in the present invention is only one kind of association relationship describing the associated object, and means that there may be three kinds of relationships, for example, a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. In the present invention, the character "/" generally indicates that the preceding and following related objects are in an "or" relationship.
It should also be understood that the description of the embodiments of the present invention emphasizes the differences between the embodiments, and the same or similar parts may be referred to each other, so that the descriptions thereof are omitted for brevity.
Meanwhile, it should be understood that the sizes of the respective portions shown in the drawings are not drawn in an actual proportional relationship for the convenience of description.
The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses.
Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail, but are intended to be part of the specification where appropriate.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.
Embodiments of the invention are operational with numerous other general purpose or special purpose computing system environments or configurations, and with numerous other electronic devices, such as terminal devices, computer systems, servers, etc. Examples of well known terminal devices, computing systems, environments, and/or configurations that may be suitable for use with electronic devices, such as terminal devices, computer systems, servers, and the like, include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, hand-held or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, networked personal computers, minicomputer systems, mainframe computer systems, distributed cloud computing environments that include any of the above, and the like.
Electronic devices such as terminal devices, computer systems, servers, etc. may be described in the general context of computer system-executable instructions, such as program modules, being executed by a computer system. Generally, program modules may include routines, programs, objects, components, logic, data structures, etc. that perform particular tasks or implement particular abstract data types. The computer system/server may be practiced in distributed cloud computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed cloud computing environment, program modules may be located in both local and remote computer system storage media including memory storage devices.
Exemplary method
Fig. 1 is a flowchart illustrating a file uploading and downloading method 100 according to an exemplary embodiment of the present invention. The embodiment can be applied to an electronic device, as shown in fig. 1, and includes the following steps:
In the embodiment of the present invention, the file uploading process specifically includes: a user initiates a file uploading instruction in a client API interface through a browser, and the client API pops up a file selection box through the browser so that the user can select files of specified types and quantity in configuration information to upload.
Optionally, the method further comprises: and the client API simultaneously shows the file uploading progress on the interface.
And 102, verifying the file type and the file number before uploading the files according to the configuration information by the client API, and slicing the files which accord with the specified file type and the file number one by one.
Optionally, the method further comprises: and for the files with the types and the number exceeding the specified number in the non-configuration information, the client API refuses to upload and pops up prompt information through the browser.
In the embodiment of the invention, the client API checks before uploading the files according to the configuration information, and the files with the specified file types and the specified number exceeding the specified number in the non-configuration information are refused to be uploaded and prompted. And the client API performs file slicing on files conforming to the specified types and quantity one by one.
And 103, the client API transmits and attaches the MD5 codes, the uploading identification instructions and the user information to the file server side piece by piece after slicing the files.
Optionally, the method further comprises: in the file uploading process, the file server side uploads or merges the file slices and feeds back the storage state information to the client side API.
In the embodiment of the invention, the client API sends and attaches the MD5 code of the file, the uploading identification instruction and the user information piece by piece according to the file slices and sends the file, the client API interface simultaneously shows the uploading progress of the file. In the uploading process, the client API checks the uploading state of the file slices according to the feedback information of the server, and tries to upload the file slices failed to upload again.
And step 104, after all the file slices are uploaded, the client API sends a file slice merging instruction, a file MD5 code and an uploading identification instruction to the file server.
And 105, the file server receives the uploading identification command, checks according to the configuration information, and stores the slice data and the user information according to the MD5 code.
And step 106, when the file server receives a file slice merging instruction of the client, the file server completes slice merging to file storage and clears slice data.
In the embodiment of the invention, the server end receives the uploading identification instruction, carries out verification processing according to the configuration information and stores the slice data and the user information according to the MD5 code. Further, when the server side receives the client side merging instruction, the slicing merging is completed to be stored as a file, and slicing data is cleaned. In the file uploading process, the server side uploads or combines the file slices and the storage state information and feeds the file slices or the combined storage state information back to the client side API for judgment and processing.
Optionally, the method further comprises: when a user downloads a file through a browser, a client API sends a file link and user information to a file server; after the file server side passes the user verification, a breakpoint resume function is started to provide file downloading service, and a client side API pops up a file storage dialog box for the user to select a file downloading storage position.
In the embodiment of the present invention, the file downloading process specifically includes: the user downloads the file through the browser, and the client API sends the file link and the user information to the server. And then, after the server side passes the user verification, starting a breakpoint resume function to provide file downloading service, and popping up a file storage dialog box by the client side API (application program interface) for the user to select a file downloading storage position.
Therefore, the file uploading and downloading interaction method provided by the invention provides the easy-to-operate and interactive client API for the user, limits the type of the file capable of being uploaded through the configuration information, and provides the file slice uploading and breakpoint continuous downloading. And before uploading the file and during downloading the file, checking and processing. The browser sends the uploading or downloading instruction to the server side, the server side carries out verification and processing through the configuration information, and file storage is completed according to the received instruction and a breakpoint resume function is started to provide downloading service. The invention adopts the file fragmentation technology to improve the transmission efficiency. And the MD5 technology is adopted to ensure the consistency of the files. Through the configuration and setting of the file types, the uploaded file types are controllable, and the system safety is improved. The client is easy to operate and friendly to interaction. Therefore, the file uploading and downloading method provided by the invention achieves the technical effects of improving the transmission efficiency and ensuring the file consistency and the system safety.
Exemplary devices
Fig. 2 is a schematic structural diagram of a file uploading and downloading system according to an exemplary embodiment of the present invention. As shown in fig. 2, the file uploading and downloading system 200 proposed in this embodiment includes: a client API210 and a file server side 220, wherein
The client APII210 is used for responding to a file uploading instruction initiated by a user in a client API interface through a browser, popping up a file selection box through the browser, and allowing the user to select files of specified file types and quantity in configuration information for uploading;
the client APII210 is also used for verifying the file type and the number before uploading the file according to the configuration information, and slicing the files which accord with the specified file type and the number one by one;
the client APII210 is also used for sending the files which are sliced according to the files and are attached with the file MD5 codes, uploading identification instructions and user information one by one to the file server;
the client-side APII210 is further used for sending the file slice merging instruction, the file MD5 code and the uploading identification instruction to the file server side after all the file slices are uploaded;
the file server 220 is used for receiving the uploading identification instruction, performing verification processing according to the configuration information, and storing the slice data and the user information according to the file MD5 code;
the file server 220 is further configured to complete the merging of the slices into a file and clean the slice data when receiving a file slice merging instruction from the client.
Optionally, the client API210 is also used to expose file upload progress at the same time on the interface.
Optionally, for files of specified file types and exceeding specified number in the non-configuration information, the client API is further configured to refuse to upload and pop up prompt information through the browser.
Optionally, in the file uploading process, the file server 220 is further configured to upload or merge file slices and store state information and feed back the file slices or the merged file slices to the client API.
Optionally, when the user downloads the file through the browser, the client API210 is further configured to send the file link and the user information to the file server;
the file server 220 is further configured to enable a breakpoint resume function to provide a file downloading service after the user checks the file, and the client API210 is further configured to pop up a file storage dialog box for the user to select a storage location for downloading the file.
The file uploading and downloading system 200 according to the embodiment of the present invention corresponds to the file uploading and downloading method 100 according to another embodiment of the present invention, and details thereof are not repeated herein.
Exemplary electronic device
Fig. 3 is a structure of an electronic device according to an exemplary embodiment of the present invention. The electronic device may be either or both of the first device and the second device, or a stand-alone device separate from them, which stand-alone device may communicate with the first device and the second device to receive the acquired input signals therefrom. FIG. 3 illustrates a block diagram of an electronic device in accordance with an embodiment of the disclosure. As shown in fig. 3, the electronic device 30 includes one or more processors 31 and memory 32.
The processor 31 may be a Central Processing Unit (CPU) or other form of processing unit having data processing capabilities and/or instruction execution capabilities, and may control other components in the electronic device to perform desired functions.
The input device 33 may also include, for example, a keyboard, a mouse, and the like.
The output device 34 can output various information to the outside. The output devices 34 may include, for example, a display, speakers, a printer, and a communication network and remote output devices connected thereto, among others.
Of course, for simplicity, only some of the components of the electronic device relevant to the present disclosure are shown in fig. 3, omitting components such as buses, input/output interfaces, and the like. In addition, the electronic device may include any other suitable components, depending on the particular application.
Exemplary computer program product and computer-readable storage Medium
In addition to the above-described methods and apparatus, embodiments of the present disclosure may also be a computer program product comprising computer program instructions that, when executed by a processor, cause the processor to perform the steps in the method of information mining of historical change records according to various embodiments of the present disclosure described in the "exemplary methods" section above of this specification.
The computer program product may write program code for carrying out operations for embodiments of the present disclosure in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server.
Furthermore, embodiments of the present disclosure may also be a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, cause the processor to perform steps in a method of information mining of historical change records according to various embodiments of the present disclosure described in the "exemplary methods" section above in this specification.
The computer-readable storage medium may take any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may include, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The foregoing describes the general principles of the present disclosure in conjunction with specific embodiments, however, it is noted that the advantages, effects, etc. mentioned in the present disclosure are merely examples and are not limiting, and they should not be considered essential to the various embodiments of the present disclosure. Furthermore, the foregoing disclosure of specific details is for the purpose of illustration and description and is not intended to be limiting, since the disclosure is not intended to be limited to the specific details so described.
In the present specification, the embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts in the embodiments are referred to each other. For the system embodiment, since it basically corresponds to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The block diagrams of devices, apparatuses, systems referred to in this disclosure are only given as illustrative examples and are not intended to require or imply that the connections, arrangements, configurations, etc. must be made in the manner shown in the block diagrams. These devices, apparatuses, devices, systems may be connected, arranged, configured in any manner, as will be appreciated by those skilled in the art. Words such as "including," "comprising," "having," and the like are open-ended words that mean "including, but not limited to," and are used interchangeably therewith. The words "or" and "as used herein mean, and are used interchangeably with, the word" and/or, "unless the context clearly dictates otherwise. The word "such as" is used herein to mean, and is used interchangeably with, the phrase "such as but not limited to".
The methods and apparatus of the present disclosure may be implemented in a number of ways. For example, the methods and apparatus of the present disclosure may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above-described order for the steps of the method is for illustration only, and the steps of the method of the present disclosure are not limited to the order specifically described above unless specifically stated otherwise. Further, in some embodiments, the present disclosure may also be embodied as programs recorded in a recording medium, the programs including machine-readable instructions for implementing the methods according to the present disclosure. Thus, the present disclosure also covers a recording medium storing a program for executing the method according to the present disclosure.
It is also noted that in the systems, apparatus and methods of the present disclosure, various components or steps may be decomposed and/or re-combined. These decompositions and/or recombinations are to be considered equivalents of the present disclosure. The previous description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other aspects without departing from the scope of the disclosure. Thus, the present disclosure is not intended to be limited to the aspects shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
The foregoing description has been presented for purposes of illustration and description. Furthermore, this description is not intended to limit embodiments of the disclosure to the form disclosed herein. While a number of example aspects and embodiments have been discussed above, those of skill in the art will recognize certain variations, modifications, alterations, additions and sub-combinations thereof.
Claims (12)
1. A file uploading and downloading method is characterized by comprising the following steps:
responding to a file uploading instruction initiated in a client API interface by a user through a browser by a client API, popping up a file selection box through the browser, and allowing the user to select files of the specified file type and number in the configuration information for uploading;
the client API checks the file type and the file number before uploading the files according to the configuration information, and performs file slicing on the files which accord with the specified file type and the file number one by one;
the client API transmits and attaches the MD5 codes of the files, uploading identification instructions and user information to the file server side one by one after slicing the files;
after uploading all the file slices, the client API sends a file slice merging instruction, a file MD5 code and an uploading identification instruction to the file server;
the file server receives the uploading identification command, carries out verification processing according to the configuration information and stores the slice data and the user information according to the file MD5 code;
and when the file server side receives a file slice merging instruction of the client side, the file server side completes slice merging to file storage and clears slice data.
2. The method of claim 1, further comprising: and the client API simultaneously shows the file uploading progress on the interface.
3. The method of claim 1, further comprising: and for the files with the types and the number exceeding the specified number in the non-configuration information, the client API refuses to upload and pops up prompt information through the browser.
4. The method of claim 1, further comprising: in the file uploading process, the file server side uploads or merges the file slices and feeds back the storage state information to the client side API.
5. The method of claim 1, further comprising:
when a user downloads a file through a browser, a client API sends a file link and user information to a file server;
after the file server side passes the user verification, a breakpoint resume function is started to provide file downloading service, and a client side API pops up a file storage dialog box for the user to select a file downloading storage position.
6. The file uploading and downloading system is characterized by comprising a client side API and a file server side, wherein
The client API is used for responding to a file uploading instruction initiated in a client API interface by a user through a browser, popping up a file selection box through the browser, and allowing the user to select files with specified file types and quantity in the configuration information for uploading;
the client API is also used for verifying the file type and the file number before uploading the files according to the configuration information and slicing the files which accord with the specified file type and the file number one by one;
the client API is also used for sending the files which are sliced according to the files and attached with the MD5 codes, the uploading identification instructions and the user information one by one to the file server;
the client API is also used for sending the file slice merging instruction, the file MD5 code and the uploading identification instruction to the file server side after all the file slices are uploaded;
the file server side is used for receiving the uploading identification instruction, carrying out verification processing according to the configuration information and storing the slice data and the user information according to a file MD5 code;
and the file server is also used for completing the combination of the slices into a file and storing and cleaning the slice data when receiving a file slice combination instruction of the client.
7. The system of claim 6, wherein the client API is further configured to expose file upload progress simultaneously on the interface.
8. The system of claim 6, wherein the client API is further configured to deny uploads and pop-up prompts via the browser for files of a specified file type and beyond a specified number in the non-configuration information.
9. The system according to claim 6, wherein in the file uploading process, the file server is further configured to upload or merge the file slices and the storage status information to the client API.
10. The system of claim 6,
when a user downloads a file through a browser, the client API is also used for sending a file link and user information to a file server;
the file server side is further used for starting a breakpoint resume function to provide file downloading service after user verification is passed, and the client side API is further used for popping up a file storage dialog box for a user to select a storage position for downloading a file.
11. An electronic device, characterized in that the electronic device comprises: a processor and a memory; wherein,
the memory to store the processor-executable instructions;
the processor is configured to read the executable instructions from the memory and execute the instructions to implement the method of any one of claims 1-5.
12. A computer-readable storage medium, characterized in that it stores a computer program for performing the method of any of the preceding claims 1-5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111441017.7A CN114390039A (en) | 2021-11-30 | 2021-11-30 | File uploading and downloading method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111441017.7A CN114390039A (en) | 2021-11-30 | 2021-11-30 | File uploading and downloading method and system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114390039A true CN114390039A (en) | 2022-04-22 |
Family
ID=81195940
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111441017.7A Pending CN114390039A (en) | 2021-11-30 | 2021-11-30 | File uploading and downloading method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114390039A (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120066346A1 (en) * | 2010-09-13 | 2012-03-15 | Microsoft Corporation | Reputation checking obtained files |
CN103220352A (en) * | 2013-04-15 | 2013-07-24 | 福建伊时代信息科技股份有限公司 | Terminal, server, file storage system and file storage method |
CN107528926A (en) * | 2017-10-11 | 2017-12-29 | 郑州云海信息技术有限公司 | A kind of file uploading method and system |
CN111935227A (en) * | 2020-07-10 | 2020-11-13 | 上海淇毓信息科技有限公司 | Method for uploading file through browser, browser and electronic equipment |
-
2021
- 2021-11-30 CN CN202111441017.7A patent/CN114390039A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120066346A1 (en) * | 2010-09-13 | 2012-03-15 | Microsoft Corporation | Reputation checking obtained files |
CN103220352A (en) * | 2013-04-15 | 2013-07-24 | 福建伊时代信息科技股份有限公司 | Terminal, server, file storage system and file storage method |
CN107528926A (en) * | 2017-10-11 | 2017-12-29 | 郑州云海信息技术有限公司 | A kind of file uploading method and system |
CN111935227A (en) * | 2020-07-10 | 2020-11-13 | 上海淇毓信息科技有限公司 | Method for uploading file through browser, browser and electronic equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US12061891B1 (en) | Cancel and rollback update stack requests | |
US10142425B2 (en) | Session reliability for a redirected USB device | |
US11983557B2 (en) | Orchestration for data pipeline execution plans | |
US8521808B2 (en) | Uploading and executing command line scripts | |
US9774698B2 (en) | Techniques to transfer large collection containers | |
US8769041B2 (en) | Document generation apparatus, document generation system, document upload method, and storage medium | |
CN103620606A (en) | Storage detecting apparatus, system, and method | |
CN114363472B (en) | Method and device for realizing image acquisition based on http protocol adaptation scanner | |
CN111049883B (en) | Data reading method, device and system of distributed table system | |
CN108833443B (en) | Message transmission method and system and computer equipment | |
US20020194212A1 (en) | Content scanning of copied data | |
CN104217165A (en) | Method and device for processing documents | |
CN110908837A (en) | Application program exception handling method and device, electronic equipment and storage medium | |
CN111400679A (en) | Trusted cloud storage method and system based on block chain | |
MX2013014808A (en) | Presentation software automation services. | |
CN113037787A (en) | Data processing method and device | |
CN110704025A (en) | Method and device for generating coding specification tool, storage medium and electronic equipment | |
CN104239795A (en) | File scanning method and device | |
CN114390039A (en) | File uploading and downloading method and system | |
CN114880157B (en) | Fault injection method and device | |
US11356465B1 (en) | Mobile device management for remediating security events | |
CN115297104A (en) | File uploading method and device, electronic equipment and storage medium | |
CN114003342A (en) | Distributed storage method and device, electronic equipment and storage medium | |
CN110633579A (en) | Bidding file online decryption result prediction method, system, device and storage medium | |
CN113779000B (en) | Database updating method and system, storage medium and electronic 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 |