CN113905041A - File uploading method and device - Google Patents
File uploading method and device Download PDFInfo
- Publication number
- CN113905041A CN113905041A CN202111180655.8A CN202111180655A CN113905041A CN 113905041 A CN113905041 A CN 113905041A CN 202111180655 A CN202111180655 A CN 202111180655A CN 113905041 A CN113905041 A CN 113905041A
- Authority
- CN
- China
- Prior art keywords
- file
- uploading
- parameters
- uploaded
- upload
- 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
- 238000000034 method Methods 0.000 title claims abstract description 48
- 238000004590 computer program Methods 0.000 claims description 16
- 238000012217 deletion Methods 0.000 claims description 9
- 230000037430 deletion Effects 0.000 claims description 9
- 238000010586 diagram Methods 0.000 description 14
- 230000006870 function Effects 0.000 description 11
- 238000011161 development Methods 0.000 description 6
- 238000012545 processing Methods 0.000 description 5
- 230000008569 process Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 238000006467 substitution reaction Methods 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 invention discloses a file uploading method and a file uploading device, and relates to the technical field of big data, wherein the method comprises the following steps: receiving an uploading parameter of a target service and a file to be uploaded, which are sent by a client; judging whether the file to be uploaded accords with the uploading parameters; and under the condition that the file to be uploaded accords with the uploading parameters, the uploading component uploads the file to be uploaded to the file server according to the uploading parameters. The invention can improve the efficiency of uploading files by different services through the uploading component.
Description
Technical Field
The invention relates to the technical field of big data, in particular to a file uploading method and device.
Background
This section is intended to provide a background or context to the embodiments of the invention that are recited in the claims. The description herein is not admitted to be prior art by inclusion in this section.
In a huge website system, different functional modules are provided. Many similar operations may be performed for different business fields, for example, uploading and previewing of documents, and in order to reduce the cost of page development, modules with similar functions may be componentized and systematized.
Although the existing uploading component can upload files of different services, due to different service fields, before uploading the files, corresponding uploading logic needs to be written according to different services, which leads to a tedious process and low efficiency of uploading the files by using the uploading component.
Disclosure of Invention
The embodiment of the invention provides a file uploading method, which is applied to an uploading component of a file uploading system and is used for improving the efficiency of uploading files through the uploading component in different services, and the method comprises the following steps:
receiving an uploading parameter of a target service and a file to be uploaded, which are sent by a client;
judging whether the file to be uploaded accords with the uploading parameters;
and under the condition that the file to be uploaded accords with the uploading parameters, the uploading component uploads the file to be uploaded to a file server according to the uploading parameters.
The embodiment of the invention also provides a file uploading device, which is applied to an uploading component of a file uploading system and is used for improving the efficiency of uploading files by different businesses through the uploading component, and the device comprises:
the first receiving module is used for receiving the uploading parameters of the target service and the file to be uploaded, which are sent by the client;
the judging module is used for judging whether the file to be uploaded accords with the uploading parameters;
and the uploading module is used for uploading the file to be uploaded to a file server according to the uploading parameters by the uploading component under the condition that the file to be uploaded conforms to the uploading parameters.
The embodiment of the invention also provides computer equipment which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the processor realizes the file uploading method when executing the computer program.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program for executing the above file uploading method is stored in the computer-readable storage medium.
In the embodiment of the invention, the uploading parameters of the target service and the file to be uploaded sent by the client are received; judging whether the file to be uploaded accords with the uploading parameters; and under the condition that the file to be uploaded accords with the uploading parameters, the uploading component uploads the file to be uploaded to the file server according to the uploading parameters. Compared with the prior technical scheme that the uploading component uploads the file, the file uploading method and the file uploading device only need to transmit the uploading parameter of the target service to the uploading component, so that the uploading component can upload the file to be uploaded of the target service according to the uploading parameter, and the file uploading efficiency of different services through the uploading component can be improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts. In the drawings:
fig. 1 is a block diagram of an upload assembly provided in an embodiment of the present invention;
fig. 2 is a flowchart of a file uploading method provided in an embodiment of the present invention;
fig. 3 is a flowchart of a method for determining whether a file to be uploaded meets upload parameters according to an embodiment of the present invention;
fig. 4 is a flowchart of another file uploading method provided in the embodiment of the present invention;
fig. 5 is a flowchart of another file uploading method provided in the embodiment of the present invention;
fig. 6 is a schematic diagram of an upload element display style in the case of adding an upload file according to an embodiment of the present invention;
fig. 7 is a schematic diagram of an upload element presentation style in a case where an upload file is updated according to an embodiment of the present invention;
fig. 8 is a flowchart of another file uploading method provided in the embodiment of the present invention;
fig. 9 is a flowchart of another file uploading method provided in the embodiment of the present invention;
fig. 10 is a schematic view of a file uploading apparatus provided in an embodiment of the present invention;
fig. 11 is a schematic view of another file uploading apparatus provided in an embodiment of the present invention;
fig. 12 is a schematic view of another file uploading apparatus provided in an embodiment of the present invention;
fig. 13 is a schematic view of another file uploading apparatus provided in the embodiment of the present invention;
FIG. 14 is a schematic diagram of another file uploading apparatus provided in the embodiment of the present invention
Fig. 15 is a schematic view of another file uploading apparatus provided in an embodiment of the present invention;
fig. 16 is a schematic diagram of a computer device provided in an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the embodiments of the present invention are further described in detail below with reference to the accompanying drawings. The exemplary embodiments and descriptions of the present invention are provided to explain the present invention, but not to limit the present invention.
The term "and/or" herein merely describes an associative relationship, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the term "at least one" herein means any one of a plurality or any combination of at least two of a plurality, for example, including at least one of A, B, C, and may mean including any one or more elements selected from the group consisting of A, B and C.
In the description of the present specification, the terms "comprising," "including," "having," "containing," and the like are used in an open-ended fashion, i.e., to mean including, but not limited to. Reference to the description of the terms "one embodiment," "a particular embodiment," "some embodiments," "for example," etc., means that a particular feature, structure, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. The sequence of steps involved in the embodiments is for illustrative purposes to illustrate the implementation of the present application, and the sequence of steps is not limited and can be adjusted as needed.
According to researches, in a website system, if different service modules need to upload images, the existing uploading component can only upload the images, and cannot view thumbnails, view original images or download the images.
To solve the above problem, as shown in fig. 1, an embodiment of the present invention provides an upload component, which includes a parent component, an upload area sub-component, and a display area sub-component;
the parent component is an index parent component and is used for receiving the uploading parameters sent by the client; and file processing rules such as preview, download and deletion are exposed outwards, so that different services call different interfaces to realize operations such as file preview, download and deletion.
The uploading area sub-component embeds the original uploading component of the browser page in the parent component in a component reference mode in the vue.js technology, and encapsulates all uploading logic therein, so that the uploading component can be compatible with different browsers. For example, the upload component may be compatible with an IE browser and a non-IE browser, the IE browser may manually submit an upload file for upload, and the google browser may upload using the method in the original upload component.
The display area sub-component can be used for displaying a file list which is successfully uploaded so as to support operations of previewing, downloading or deleting a single file.
It should be noted that, for the development of the upload component, background systems connected to different services are different, and interfaces provided by each service are also different, so in the embodiment of the present invention, the upload component relates to a communication interface interacting with the background system, and is normalized into a unified data structure, and different interface names are transferred to the upload component system in a parameter form when being referred. Therefore, the uploading component can identify different services to acquire personalized data to perform uploading, inquiring, picture previewing and downloading operations.
Based on the upload component, an embodiment of the present invention provides a file upload method, which is applied to the upload component, and as shown in fig. 2, the method includes the following steps:
step 201: receiving an uploading parameter of a target service and a file to be uploaded, which are sent by a client;
step 202: judging whether the file to be uploaded accords with the uploading parameters;
step 203: and under the condition that the file to be uploaded accords with the uploading parameters, the uploading component uploads the file to be uploaded to a file server according to the uploading parameters.
In the embodiment of the invention, the uploading parameters of the target service and the file to be uploaded sent by the client are received; judging whether the file to be uploaded accords with the uploading parameters; and under the condition that the file to be uploaded accords with the uploading parameters, the uploading component uploads the file to be uploaded to the file server according to the uploading parameters. Therefore, for different services, only the uploading parameters corresponding to the services need to be transmitted to the uploading component, so that the uploading component can upload the file to be uploaded of the target service according to the uploading parameters, and the file uploading efficiency of different services through the uploading component and the component development efficiency of the same functions for different services can be improved.
In step 201, the upload component receives an upload parameter related to a service that needs to upload a file and is sent by the client. The upload parameters of different services are also different. The uploading parameters may include target service identity information, target service uploading file restriction parameters, target service uploading permission information, a usage scenario of the target service invoking and uploading component, and the like.
The target service identity information is used to indicate the identity of the target service, and may be a unique code of the target service, or a name of the target service, or the like.
The target service uploading authority information is used for indicating whether the target service has the authority of calling the uploading component to upload the file.
The target service uploading file limiting parameter is a parameter used for indicating that an uploaded file should conform to when the target service calls the uploading component. Specifically, the target service upload file limit parameters may include an upload file number limit, an upload file size limit, an upload file type limit, and the like. For example, the number of files and the size of the files may be a specific value or a range value. The file type can be limited to a specific type or a plurality of specific types.
The usage scenario of the target service call uploading component is used for indicating that the target service call uploading component is used for adding an uploading file newly or updating the uploading file and the like.
In addition, the file to be uploaded may be a document, a picture, a video, or the like, and is not limited herein.
In the step 202, before uploading the file to be uploaded, the acquired file to be uploaded needs to be judged, and the uploaded file limitation parameter meeting the uploading parameter is determined.
According to the above description, the target service upload file restriction parameter may include a limit on the number of upload files, a limit on the size of an upload file, a limit on the type of upload file, and the like, and thus, the file size, the number of files, and the type of files of the file to be uploaded may be compared with the target service upload file restriction parameter.
Specifically, as shown in fig. 3, the flowchart for determining whether a file to be uploaded meets an upload parameter according to an embodiment of the present invention includes the following steps:
step 301: determining file parameters of the file to be uploaded according to the file to be uploaded, wherein the file parameters comprise file size, file number and file type;
step 302: and comparing the file parameters with the target service uploading file limiting parameters, and if the file parameters meet the target service uploading file limiting parameters, determining that the file to be uploaded meets the uploading parameters.
Specifically, the file size in the file parameter is compared with the file size in the target service upload file restriction parameter, and if the file size is equal to or smaller than the file size in the target service upload file restriction parameter (when the file size is a specific value), or the file size is within the range of the file size in the target service upload file restriction parameter (the file size is a range value), it indicates that the file parameter satisfies the target service upload file restriction parameter;
comparing the number of the files in the file parameters with the number of the files in the target service uploading file limiting parameter, and if the number of the files is equal to or less than the number of the files in the target service uploading file limiting parameter (when the number of the files is a specific value), or the number of the files is within the range of the number of the files in the target service uploading file limiting parameter (the number of the files is a range value), indicating that the file parameters meet the target service uploading file limiting parameter;
comparing the file type in the file parameter with the file type in the target service uploading file limiting parameter, if the file type is one and the file type in the target service uploading file limiting parameter exists, indicating that the file parameter meets the target service uploading file limiting parameter; if there are multiple file types, and only a few file types in the target service uploading file restriction parameter do not correspond to multiple file types, it is correspondingly indicated that the file parameter meets the target service uploading file restriction parameter, and only the file corresponding to the file type is sent.
In step 203, if the file to be uploaded conforms to the upload parameter, the upload component uploads the file to be uploaded to the file server directory corresponding to the target service according to the target service identity information in the upload parameter.
Therefore, when different businesses call the uploading components with similar functions, complex logic of uploading files does not need to be processed repeatedly, only the uploading parameters corresponding to the businesses need to be sent to the uploading components, and the uploading components can upload the files according to the uploading parameters, so that the file uploading efficiency of different businesses can be improved, and the development efficiency of the components with the same functions of different businesses can be improved.
According to the above description, the upload parameters include the upload permission information of the target service, so that before determining whether the file to be uploaded meets the upload parameters, it is necessary to determine whether the target service has the permission to call the upload component.
Specifically, as shown in fig. 4, a flowchart of another file uploading method provided in the embodiment of the present invention is shown. Before the step 202, the following steps are also included:
step 401: and determining that the target service has the uploading authority according to the uploading authority information of the target service.
In the embodiment of the invention, in the file server, different services correspond to different service storage modules, and the uploading component uploads the uploaded file to the file server by calling different service interfaces.
Specifically, as shown in fig. 5, a flowchart of another file uploading method provided in the embodiment of the present invention is shown. Before the step 203, the method further comprises the following steps:
step 501: determining a service interface called by the uploading component when the file is uploaded according to the target service identity information;
the step 203 includes: and when the target service has the uploading permission and the file to be uploaded accords with the uploading parameters, the uploading component calls the service interface and uploads the file to be uploaded to the file server.
In addition, in the embodiment of the present invention, the uploading parameter of the target service further includes a usage scenario of the target service calling uploading component, and the display style of the uploading component can be determined from the preset component display styles according to the usage scenario of the target service calling uploading component.
The preset component display style may include at least one of an upload component display style in the case of adding an upload file and an upload component display style in the case of updating the upload file.
For example, two component display styles shown in fig. 6 and 7 may be preset, where the component display style shown in fig. 6 is an upload component display style when the usage scenario is a newly added upload file, and when the usage scenario in which the target service calls the upload component is a newly added upload file, the style is selected, the upload component is directly displayed in the middle of the page, and a button for a new add operation is set in the upload component display style; the component display style shown in fig. 7 is an upload component display style when the usage scene is an update upload file, and when the usage scene of the upload component called by the target service is an update upload file, the style is selected, the upload component pops up from the bottom of the browser in the form of a pop-up frame, and the upload component display style is provided with a button for update operation.
Based on the two component display styles, when the file is uploaded by the uploading component, the file to be uploaded can be dragged to enter the browser, the covering layer of the whole uploading area can be activated, and the file is dragged to the uploading area to release the mouse, so that the uploading can be completed.
Therefore, different display styles are set for different use scenes of the uploading component, component interface elements can be flexibly configured, and the experience of a user is improved.
It should be noted that the preset component display style may be set according to a specific application scenario, and is not limited to the two types provided in the embodiment of the present invention.
In the embodiment of the invention, after the file to be uploaded is successfully uploaded, the uploading component receives the file data which is returned by the file server interface and successfully uploaded, and the file list which is successfully uploaded can be displayed in the display area of the uploading component.
Specifically, as shown in fig. 8, a flowchart of another file uploading method provided in the embodiment of the present invention is shown. After the step 203, the method further comprises the steps of:
step 801: the uploading component receives file information which is transmitted by the file server and is uploaded successfully, and a file list is generated;
step 802: the uploading component displays the file list in a preset form, wherein the preset form can be that the file list is displayed in a thumbnail mode.
In the embodiment of the invention, in the display area of the uploading component, each file in the file list supports functions of thumbnail preview, original image downloading, original image deletion and the like. When a user triggers a download or deletion event for a certain file, the upload component may send the download or deletion event to a file server interface corresponding to the service, so that the file server executes the download or deletion operation.
Specifically, as shown in fig. 9, the method further includes the steps of:
step 901: the uploading component receives a downloading instruction or a deleting instruction of any file in the file list;
step 902: and sending the downloading indication or the deleting indication to the file server so that the file server executes the downloading operation or the deleting operation.
Therefore, the uploading component can integrate uploading and previewing, can provide feedback for a user in time, and can be called through different service interfaces, so that the user can know the uploading result of the uploaded file in time, visually check the uploaded file, delete or modify the uploaded file, and the like, and the user experience is greatly improved.
The embodiment of the invention also provides a file uploading device, which is described in the following embodiment. Because the principle of the device for solving the problems is similar to the file uploading method, the implementation of the device can refer to the implementation of the file uploading method, and repeated parts are not described again.
As shown in fig. 10, a schematic diagram of a file uploading apparatus provided in an embodiment of the present invention includes: a first receiving module 1001, a judging module 1002 and an uploading module 1003; wherein,
a first receiving module 1001, configured to receive an upload parameter of a target service and a file to be uploaded, where the upload parameter is sent by a client;
a judging module 1002, configured to judge whether the file to be uploaded meets the uploading parameter;
an uploading module 1003, configured to, when the file to be uploaded meets the uploading parameter, upload the file to be uploaded to a file server by the uploading component according to the uploading parameter.
In a possible implementation manner, the upload parameter includes target service identity information, the target service upload file restriction parameter, and the target service upload permission information.
In a possible embodiment, as shown in fig. 11, the apparatus further comprises:
the permission determining module 1101 is configured to determine that the target service has an upload permission according to the target service upload permission information;
the upload module 1003 is specifically configured to:
and when the target service has the uploading permission and the file to be uploaded conforms to the uploading parameters, the uploading component uploads the file to be uploaded to a file server according to the uploading parameters.
In one possible implementation, the target service upload file restriction parameter includes an upload file number restriction, an upload file size restriction, and an upload file type restriction;
the determining module 1002 is specifically configured to: determining file parameters of the file to be uploaded according to the file to be uploaded, wherein the file parameters comprise file size, file number and file type; and comparing the file parameters with the target service uploading file limiting parameters, and if the file parameters meet the target service uploading file limiting parameters, determining that the file to be uploaded meets the uploading parameters.
In a possible embodiment, as shown in fig. 12, the apparatus further comprises:
an interface determining module 1201, configured to determine, according to the target service identity information, a service interface that is called by the upload component when the file is uploaded;
the upload module 1003 is specifically configured to:
and the uploading component calls the service interface and uploads the file to be uploaded to a file server.
In a possible implementation manner, the uploading parameter further includes a usage scenario of the target service call uploading component; as shown in fig. 13, the apparatus further includes:
the style determination module 1301 is configured to determine a display style of the upload component from preset component display styles according to a usage scenario of the target service call upload component.
In one possible embodiment, the preset component presentation style comprises; and at least one of the uploading component display style under the condition of newly adding the uploading file and the uploading component display style under the condition of updating the uploading file.
In a possible embodiment, as shown in fig. 14, the apparatus further comprises:
a second receiving module 1401, configured to receive file information that is successfully uploaded and sent by the file server, and generate a file list;
a display module 1402, configured to display the file list in a preset form by the upload component.
In a possible embodiment, the preset form includes displaying the file list in a thumbnail form.
In a possible embodiment, as shown in fig. 15, the apparatus further comprises:
a third receiving module 1501, configured to receive a download instruction or a deletion instruction for any file in the file list;
a sending module 1502, configured to send the download instruction or the delete instruction to the file server, so that the file server executes a download operation or a delete operation.
In the embodiment of the invention, only the uploading parameter of the target service needs to be transmitted to the uploading component, so that the uploading component can upload the file to be uploaded of the target service according to the uploading parameter, and the file uploading efficiency of different services through the uploading component and the component development efficiency aiming at the same function of different services can be improved.
Based on the foregoing inventive concept, as shown in fig. 16, an embodiment of the present invention further provides a computer device 1600, which includes a memory 1610, a processor 1620, and a computer program 1630 stored on the memory 1610 and executable on the processor 1620, and when the computer program is executed by the processor, the file uploading method is implemented.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program for executing the above file uploading method is stored in the computer-readable storage medium.
In the embodiment of the invention, the uploading parameters sent by the client are received; acquiring a file to be uploaded of the target service according to the target service identity information in the uploading parameters; judging whether the file to be uploaded accords with the uploading parameters; and under the condition that the file to be uploaded accords with the uploading parameters, the uploading component uploads the file to be uploaded to a file server directory corresponding to the target service according to the uploading parameters. Compared with the prior technical scheme that the uploading component uploads the file, the file uploading method and the file uploading system have the advantages that only the uploading parameter of the target service needs to be transmitted to the uploading component, so that the uploading component can upload the file to be uploaded of the target service according to the uploading parameter, and therefore the file uploading efficiency of different services through the uploading component and the component development efficiency of the same function aiming at different services can be improved.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention 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 invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. 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.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are only exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.
Claims (20)
1. A file uploading method is characterized in that an uploading component applied to a file uploading system comprises the following steps:
receiving an uploading parameter of a target service and a file to be uploaded, which are sent by a client;
judging whether the file to be uploaded accords with the uploading parameters;
and under the condition that the file to be uploaded accords with the uploading parameters, the uploading component uploads the file to be uploaded to a file server according to the uploading parameters.
2. The method of claim 1, wherein the upload parameters comprise target service identity information, the target service upload file restriction parameter, and the target service upload permission information.
3. The method of claim 2, wherein before determining whether the file to be uploaded meets the upload parameters, further comprising:
determining that the target service has an uploading authority according to the target service uploading authority information;
under the condition that the file to be uploaded accords with the uploading parameters, the uploading component uploads the file to be uploaded to a file server according to the uploading parameters, and the uploading component comprises:
and when the target service has the uploading permission and the file to be uploaded conforms to the uploading parameters, the uploading component uploads the file to be uploaded to a file server according to the uploading parameters.
4. The method of claim 2, wherein the target business upload file restriction parameters include an upload file number restriction, an upload file size restriction, and an upload file type restriction;
judging whether the file to be uploaded accords with the uploading parameters or not, including:
determining file parameters of the file to be uploaded according to the file to be uploaded, wherein the file parameters comprise file size, file number and file type;
and comparing the file parameters with the target service uploading file limiting parameters, and if the file parameters meet the target service uploading file limiting parameters, determining that the file to be uploaded meets the uploading parameters.
5. The method of claim 2, further comprising:
determining a service interface called by the uploading component when the file is uploaded according to the target service identity information;
the uploading component uploads the file to be uploaded to a file server according to the uploading parameters, and the uploading component comprises:
and the uploading component calls the service interface and uploads the file to be uploaded to a file server.
6. The method of claim 1, wherein the upload parameters further comprise usage scenarios for the target service invocation upload component;
the method further comprises the following steps:
and determining the display style of the uploading component from preset component display styles according to the use scene of the uploading component called by the target service.
7. The method of claim 1, wherein the method further comprises:
receiving file information which is transmitted by the file server and is uploaded successfully, and generating a file list;
the uploading component displays the file list in a preset form.
8. The method of claim 7, wherein the preset form includes displaying the list of files in a thumbnail form.
9. The method of claim 7, wherein the method further comprises:
receiving a download instruction or a deletion instruction of any file in the file list;
and sending the downloading indication or the deleting indication to the file server so that the file server executes downloading operation or deleting operation.
10. A file uploading device is characterized in that an uploading component applied to a file uploading system comprises:
the first receiving module is used for receiving the uploading parameters of the target service and the file to be uploaded, which are sent by the client;
the judging module is used for judging whether the file to be uploaded accords with the uploading parameters;
and the uploading module is used for uploading the file to be uploaded to a file server according to the uploading parameters by the uploading component under the condition that the file to be uploaded conforms to the uploading parameters.
11. The apparatus of claim 10, wherein the upload parameters comprise target service identity information, the target service upload file restriction parameter, and the target service upload permission information.
12. The apparatus of claim 11, further comprising:
the authority determining module is used for determining that the target service has the uploading authority according to the uploading authority information of the target service;
the upload module is specifically configured to:
and when the target service has the uploading permission and the file to be uploaded conforms to the uploading parameters, the uploading component uploads the file to be uploaded to a file server according to the uploading parameters.
13. The apparatus of claim 11, wherein the target business upload file restriction parameters include an upload file number restriction, an upload file size restriction, and an upload file type restriction;
the judgment module is specifically configured to:
determining file parameters of the file to be uploaded according to the file to be uploaded, wherein the file parameters comprise file size, file number and file type;
and comparing the file parameters with the target service uploading file limiting parameters, and if the file parameters meet the target service uploading file limiting parameters, determining that the file to be uploaded meets the uploading parameters.
14. The apparatus of claim 11, further comprising:
the interface determining module is used for determining a service interface called by the uploading component when the file is uploaded according to the target service identity information;
the upload module is specifically configured to:
and the uploading component calls the service interface and uploads the file to be uploaded to a file server.
15. The apparatus of claim 10, wherein the upload parameters further comprise a usage scenario of the target service invocation upload component;
the device further comprises:
and the style determining module is used for determining the display style of the uploading component from preset component display styles according to the use scene of the uploading component called by the target service.
16. The apparatus of claim 10, wherein the apparatus further comprises:
the second receiving module is used for receiving the file information which is transmitted by the file server and is uploaded successfully, and generating a file list;
and the display module is used for displaying the file list in a preset form by the uploading component.
17. The apparatus of claim 16, wherein the preset form comprises displaying the list of files in a thumbnail form.
18. The apparatus of claim 16, wherein the apparatus further comprises:
a third receiving module, configured to receive a download instruction or a deletion instruction for any file in the file list;
and the sending module is used for sending the downloading indication or the deleting indication to the file server so as to enable the file server to execute downloading operation or deleting operation.
19. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any of claims 1 to 9 when executing the computer program.
20. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program for executing the method of any one of claims 1 to 9.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111180655.8A CN113905041B (en) | 2021-10-11 | 2021-10-11 | File uploading method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111180655.8A CN113905041B (en) | 2021-10-11 | 2021-10-11 | File uploading method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113905041A true CN113905041A (en) | 2022-01-07 |
CN113905041B CN113905041B (en) | 2024-04-16 |
Family
ID=79191218
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111180655.8A Active CN113905041B (en) | 2021-10-11 | 2021-10-11 | File uploading method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113905041B (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109361731A (en) * | 2018-09-03 | 2019-02-19 | 中国平安人寿保险股份有限公司 | A kind of method, storage medium and server that file uploads |
CN110875932A (en) * | 2018-08-29 | 2020-03-10 | 阿里巴巴集团控股有限公司 | File uploading method, device and system |
-
2021
- 2021-10-11 CN CN202111180655.8A patent/CN113905041B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110875932A (en) * | 2018-08-29 | 2020-03-10 | 阿里巴巴集团控股有限公司 | File uploading method, device and system |
CN109361731A (en) * | 2018-09-03 | 2019-02-19 | 中国平安人寿保险股份有限公司 | A kind of method, storage medium and server that file uploads |
Also Published As
Publication number | Publication date |
---|---|
CN113905041B (en) | 2024-04-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2018072634A1 (en) | Application processing method and device | |
KR102121626B1 (en) | Associating a file type with an application in a network storage service | |
US12056415B2 (en) | Desktop sharing method and mobile terminal | |
US20090307602A1 (en) | Systems and methods for creating and sharing a presentation | |
EP3309695A1 (en) | Information processing apparatus, document display method, document display system, and program | |
US9307010B2 (en) | Data upload method using shortcut | |
US20180107686A1 (en) | Search method and apparatus | |
CN110597773B (en) | Method and apparatus for sharing files between computer device and virtual reality device | |
US20150089377A1 (en) | Method and system for selection of user interface rendering artifacts in enterprise web applications using a manifest mechanism | |
US11647250B2 (en) | Methods and systems for remote streaming of a user-customized user interface | |
EP4080507A1 (en) | Method and apparatus for editing object, electronic device and storage medium | |
EP2924565A1 (en) | Web-application-launch application programming interface | |
CN111209727A (en) | Picture processing method and device, electronic equipment and storage medium | |
CN110865981A (en) | File access method for mobile terminal and mobile terminal thereof | |
CN110825600A (en) | Page information processing method, server and page display device | |
KR101659147B1 (en) | Information processing apparatus, and control method therefor | |
CN117311795A (en) | APP visual development method and device and electronic equipment | |
Delessio et al. | Sams teach yourself Android application development in 24 hours | |
CN113905041B (en) | File uploading method and device | |
US11843679B2 (en) | Automated dependency management based on page components | |
CN113590564B (en) | Data storage method, device, electronic equipment and storage medium | |
CN111596933B (en) | File processing method, device, electronic equipment and computer readable storage medium | |
US11514051B1 (en) | Tags and permissions in a content management system | |
US10642629B2 (en) | Web-application-launch application programming interfaces | |
CN113286001A (en) | Electronic file uploading method and system |
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 |