[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN109361731A - A kind of method, storage medium and server that file uploads - Google Patents

A kind of method, storage medium and server that file uploads Download PDF

Info

Publication number
CN109361731A
CN109361731A CN201811018220.1A CN201811018220A CN109361731A CN 109361731 A CN109361731 A CN 109361731A CN 201811018220 A CN201811018220 A CN 201811018220A CN 109361731 A CN109361731 A CN 109361731A
Authority
CN
China
Prior art keywords
file
uploaded
uploads
condition
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201811018220.1A
Other languages
Chinese (zh)
Inventor
马铭雄
陈佩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Life Insurance Company of China Ltd
Original Assignee
Ping An Life Insurance Company of China Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Life Insurance Company of China Ltd filed Critical Ping An Life Insurance Company of China Ltd
Priority to CN201811018220.1A priority Critical patent/CN109361731A/en
Publication of CN109361731A publication Critical patent/CN109361731A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present invention relates to field of computer technology, propose a kind of method, storage medium and server that file uploads.The method that the file uploads includes: to obtain file to be uploaded;The extraction conditions configuration parameter from the functional configuration file of the transmitting assembly constructed in advance;Determine that file uploads condition according to the condition configuration parameter;If the file to be uploaded, which meets the file, uploads condition, the file to be uploaded is uploaded to by server by the transmitting assembly;If the file to be uploaded does not meet the file and uploads condition, the file to be uploaded is uploaded to server by refusal.The functional configuration file that the present invention passes through building transmitting assembly, corresponding file can be set and upload condition, the file for only meeting file upload condition could smoothly be uploaded to server, to realize the control that file uploads, the file management for server is provided convenience.

Description

A kind of method, storage medium and server that file uploads
Technical field
The present invention relates to method, storage medium and servers that field of computer technology more particularly to a kind of file upload.
Background technique
Currently, user when transmitting file in client to server, is generally only that file is simply uploaded to server Specified directory, server can't manage the file of upload.This results in server to be likely to be received some uneasinesses Complete or excessive file is made troubles to the normal file management of server.
Summary of the invention
In view of this, the embodiment of the invention provides method, storage medium and server that a kind of file uploads, it can be right The file that user uploads is managed, and is provided convenience for the file management of server.
The embodiment of the present invention in a first aspect, providing a kind of method that file uploads, comprising:
Obtain file to be uploaded;
The extraction conditions configuration parameter from the functional configuration file of the transmitting assembly constructed in advance;
Determine that file uploads condition according to the condition configuration parameter;
If the file to be uploaded meets the file and uploads condition, pass through the transmitting assembly for the text to be uploaded Part is uploaded to server;
If the file to be uploaded does not meet the file and uploads condition, the file to be uploaded is uploaded to clothes by refusal Business device.
The second aspect of the embodiment of the present invention, provides a kind of computer readable storage medium, described computer-readable to deposit Storage media is stored with computer-readable instruction, and such as the embodiment of the present invention is realized when the computer-readable instruction is executed by processor First aspect propose file upload method the step of.
The third aspect of the embodiment of the present invention, provides a kind of server, including memory, processor and is stored in institute The computer-readable instruction that can be run in memory and on the processor is stated, the processor executes described computer-readable Following steps are realized when instruction:
Obtain file to be uploaded;
The extraction conditions configuration parameter from the functional configuration file of the transmitting assembly constructed in advance;
Determine that file uploads condition according to the condition configuration parameter;
If the file to be uploaded meets the file and uploads condition, pass through the transmitting assembly for the text to be uploaded Part is uploaded to server;
If the file to be uploaded does not meet the file and uploads condition, the file to be uploaded is uploaded to clothes by refusal Business device.
The method that the file that the embodiment of the present invention proposes uploads includes: to obtain file to be uploaded;From the upload constructed in advance Extraction conditions configuration parameter in the functional configuration file of component;Determine that file uploads condition according to the condition configuration parameter;If The file to be uploaded meets the file and uploads condition, then the file to be uploaded is uploaded to clothes by the transmitting assembly Business device;If the file to be uploaded does not meet the file and uploads condition, the file to be uploaded is uploaded to service by refusal Device.The present invention can be arranged corresponding file and upload condition, only meet text by the functional configuration file of building transmitting assembly The file that part uploads condition could smoothly be uploaded to server, be the file pipe of server to realize the control that file uploads Reason is provided convenience.
Detailed description of the invention
It to describe the technical solutions in the embodiments of the present invention more clearly, below will be to embodiment or description of the prior art Needed in attached drawing be briefly described, it should be apparent that, the accompanying drawings in the following description is only of the invention some Embodiment for those of ordinary skill in the art without any creative labor, can also be according to these Attached drawing obtains other attached drawings.
Fig. 1 is the flow chart of the one embodiment for the method that a kind of file provided in an embodiment of the present invention uploads;
Fig. 2 is the flow chart of second embodiment of the method that a kind of file provided in an embodiment of the present invention uploads;
Fig. 3 is the structure chart of the one embodiment for the device that a kind of file provided in an embodiment of the present invention uploads;
Fig. 4 is a kind of schematic diagram of server provided in an embodiment of the present invention.
Specific embodiment
The embodiment of the invention provides method, storage medium and servers that a kind of file uploads, can upload to user File managed, provide convenience for the file management of server.
In order to make the invention's purpose, features and advantages of the invention more obvious and easy to understand, below in conjunction with the present invention Attached drawing in embodiment, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that disclosed below Embodiment be only a part of the embodiment of the present invention, and not all embodiment.Based on the embodiments of the present invention, this field Those of ordinary skill's all other embodiment obtained without making creative work, belongs to protection of the present invention Range.
Referring to Fig. 1, the one embodiment for a kind of method that file uploads in the embodiment of the present invention includes:
101, file to be uploaded is obtained;
File to be uploaded is stored in client, prepares the file for being uploaded to server end, can be various types of texts Part, such as document, audio-video document, software installation packet etc..
102, the extraction conditions configuration parameter from the functional configuration file of the transmitting assembly constructed in advance;
After obtaining file to be uploaded, extraction conditions are configured from the functional configuration file of the transmitting assembly constructed in advance Parameter.The transmitting assembly has functional configuration file being capable of structure by the condition configuration parameter being arranged in the functional configuration file It builds file and uploads condition, to realize the management and monitoring for uploading, downloading to file.
103, determine that file uploads condition according to the condition configuration parameter;;
After extracting condition configuration parameter, determine that file uploads condition according to the condition configuration parameter.Specifically It may include: file type limitation, file size limitation, file security verification and file storage catalogue that file, which uploads condition, Setting etc..
In practical applications, the transmitting assembly can be the component of jar format.Jar format is with popular ZIP format Basis, unlike ZIP file, jar file is applied not only to compress and issue, but also for disposing and encapsulating library, component And plug-in card program.By the way that file is uploaded, download function be packaged into a jar component, user calls the component in which can be convenient Api interface, realize upload and the down operation of file.In addition, the transmitting assembly of the jar format has properties format Functional configuration file.Properties file in Java is a kind of configuration file, is mainly used for expressing configuration information, file Type is * .properties, and format is text file, and the content format of file is the format of " key=value ".
In one embodiment, the condition configuration parameter that some module test of functional configuration file is shown is as follows:
Test.config=" suffix ": " .jpeg | .jpg | .bmp | .gif | .txt | .part | .json | .png ", " uploadSizeLimit":"2048","isDeleteControll":"on""deleteAccessMethod":"com.pa ic.esales.nas.UploadTest.testAccess","rootName":" fileHandle.pub.nas.upload.path","uploadDirFormat":"yyyyMM","nasPath":"test"," handleType":"nas"}
Wherein, suffix representation module only allows to access .jpeg | .jpg | .bmp | and .gif | .txt | .part | .json | .png the file of these types;The upper limit of uploadSizeLimit expression file size;IsDeleteControll is indicated whether File can be deleted;DeleteAccessMethod indicates that file deletes the control method of permission, and user can voluntarily add industry Business logic;RootName indicates the root of file storage;Upload.path indicates that file uploads catalogue; Whether transmitting file enables date catalogue in uploadDirFormat expression, i.e., the newly-built catalogue named with date when file uploads; Naspath indicates the relative directory of file storage;Handletype indicate file storage mode, can support nas volumes, iobs, The storage systems such as obs, cms.
As it can be seen that can formulate all kinds of files by each condition configuration parameter of modification functional configuration file and upload item Part.Furthermore it is also possible to the content of the functional configuration file is loaded into caching by asynchronous thread, to realize need not The content of configuration file is flexibly changed under conditions of the service of restarting.
104, judge whether the file to be uploaded meets the file and upload condition;
After determining file upload condition, judge whether the file to be uploaded meets the file and upload condition.One As according to all kinds of property parameters of file to be uploaded judge whether it eligible, such as file size, file type etc..
Optionally, step 104 may include:
(1) suffix name of the file to be uploaded is obtained;
(2) judge whether the file to be uploaded belongs to the file type for allowing to upload according to the suffix name;
(3) if the file type that the file to be uploaded, which belongs to, to be allowed to upload, determines that the file to be uploaded meets institute It states file and uploads condition;
(4) if the file type that the file to be uploaded, which is not belonging to, to be allowed to upload, determines that the file to be uploaded is not inconsistent It closes the file and uploads condition.
For example, if the functional configuration file limitation client can only upload jpeg, jpg, bmp, gif, txt and png this The file of a little types, then obtain the suffix name of file to be uploaded, if the suffix name belongs to one of these type files, table Bright file to be uploaded belongs to the file type for allowing to upload, and otherwise shows that file to be uploaded is not belonging to the files classes for allowing to upload Type.
Further, described to be uploaded in judgement if the file type that the file to be uploaded, which belongs to, to be allowed to upload Before file meets the file upload condition, can also include:
(A) byte stream of the file to be uploaded is extracted;
(B) whether detect has file header corresponding with suffix name mark in the byte stream;
(C) if having file header corresponding with suffix name mark in the byte stream, determine the text to be uploaded Part meets the file and uploads condition;
(D) if file header not corresponding with the suffix name identifies in the byte stream, determine the text to be uploaded Part does not meet the file and uploads condition.
Certain illegal users are after knowing the file type for allowing to upload, it is possible to after malicious modification file to be uploaded Sew name, becomes the file suffixes name for allowing to upload.The application is by extracting the file header label in file byte stream to be uploaded Know, judges its file header mark whether corresponding with suffix name, such issues that can well solve.
For example, the following are the corresponding relationships of some suffix names and file header:
1.JPEG
File header identifies (2bytes): ff, d8 (SOI) (jpeg file mark)
The end of file identifies (2bytes): $ ff, $ d9 (EOI)
2.PNG
File header identifies 47 0D 0A 1A0A of (8bytes) 89 50 4E
3.GIF
File header identifies (6bytes) 47 49 46 38 39 (37) 61
4.BMP
File header identifies (2bytes) 42 4D
5.PCX
File header identifies (1bytes) 0A
6.GIFF
File header identifies (2bytes) 4D 4D or 49 49
7.ICO
File header identifies (8bytes) 00 00 01 00 01 00 20 20
8.CUR
File header identifies (8bytes) 00 00 02 00 01 00 20 20
9.IFF
File header identifies 52 4D of (4bytes) 46 4F
10.ANI
File header identifies (4bytes) 52 49 46 46
For example, if the entitled BMP of suffix of the file to be uploaded, in the byte stream for detecting the file to be uploaded Whether there is file header to identify 42 4D, if having this document leader to know, determines that the file to be uploaded meets on the file Otherwise biography condition determines that the file to be uploaded does not meet the file and uploads condition.
Optionally, step 104 may include:
(1) virus scan is carried out to the file to be uploaded;
(2) if the virus scan passes through, and the file size of the file to be uploaded is less than the functional configuration file The upper limit value of restriction then determines that the file to be uploaded meets the file and uploads condition;
(3) if the virus scan does not pass through or the file size of the file to be uploaded is greater than the functional configuration The upper limit value that file limits then determines that the file to be uploaded does not meet the file and uploads condition.
By carrying out virus scan and setting file size limitation to file to be uploaded, can be avoided containing virulent text Part and excessive file are uploaded to server.Both may be used it should be noted that the application Miscellaneous Documents set forth above upload condition It is used, can also individually be used with combining.
If the file to be uploaded, which meets the file, uploads condition, 105 are thened follow the steps;If the file to be uploaded is not Meet the file and upload condition, thens follow the steps 106.
105, the file to be uploaded is uploaded to by server by the transmitting assembly;
The file to be uploaded meets the file and uploads condition, passes through the transmitting assembly at this time for the text to be uploaded Part is uploaded to server.Specifically, client can call the api interface of the transmitting assembly, connect to be established with server end It connects, then uploads the file to be uploaded.
Further, step 105 may include:
(1) the extraction document upload parameter from the functional configuration file, the file upload parameter are uploaded comprising file Marker bit to the root of server and for starting date catalogue;
(2) if the marker bit is the first numerical value, the creation file that the date is named on the day of under the root, And the file to be uploaded is saved to the file;
(3) it if the marker bit is second value, is created in advance under the file to be uploaded is saved to the root In the default folder built.
In upper transmitting file, extraction document upload parameter, the file ginseng can be uploaded from the functional configuration file Number is uploaded to the root of server and the marker bit for starting date catalogue comprising file.If the marker bit is first Numerical value (such as 1) then creates the file that the date is named on the day of under the root, and the file to be uploaded is saved In to the file;If the marker bit is second value (such as 0), the file to be uploaded is saved to described mesh In the default folder being pre-created under record.It is arranged in this way, the convenience of server admin file can be further increased.
106, the file to be uploaded is uploaded to server by refusal.
The file to be uploaded does not meet the file and uploads condition, refuses the file to be uploaded being uploaded to clothes at this time Business device.
The method that the file that the embodiment of the present invention proposes uploads includes: to obtain file to be uploaded;From the upload constructed in advance Extraction conditions configuration parameter in the functional configuration file of component;Determine that file uploads condition according to the condition configuration parameter;If The file to be uploaded meets the file and uploads condition, then the file to be uploaded is uploaded to clothes by the transmitting assembly Business device;If the file to be uploaded does not meet the file and uploads condition, the file to be uploaded is uploaded to service by refusal Device.The present invention can be arranged corresponding file and upload condition, only meet text by the functional configuration file of building transmitting assembly The file that part uploads condition could smoothly be uploaded to server, be the file pipe of server to realize the control that file uploads Reason is provided convenience.
Referring to Fig. 2, second embodiment of a kind of method that file uploads in the embodiment of the present invention includes:
201, file to be uploaded is obtained;
202, the extraction conditions configuration parameter from the functional configuration file of the transmitting assembly constructed in advance;
203, determine that file uploads condition according to the condition configuration parameter;
204, judge whether the file to be uploaded meets the file and upload condition;
Step 201-204 is identical as step 101-104, specifically can refer to the related description of step 101-104.If it is described to Upper transmitting file meets the file and uploads condition, thens follow the steps 205-208;If the file to be uploaded does not meet the file Upload condition, thens follow the steps 209.
205, the identity of the user currently logged in client is obtained;
The file to be uploaded meets the file and uploads condition, obtains the body of the user currently logged in client at this time Part mark.Specifically, the identity can be user name, employee number of user's login etc. for characterizing the mark of identity information Know.
206, judge whether current time belongs to the corresponding file uplink time of the identity;
After obtaining the identity, judge whether current time belongs to the corresponding file of the identity and upload Time.If current time belongs to the corresponding file uplink time of the identity, 207 are thened follow the steps;If current time is not Belong to the corresponding file uplink time of the identity, thens follow the steps 208.
In operation system, multiple users from different departments require upper transmitting file to server.It is big in order to prevent Transmitting file in user's concentration is measured, the problem for causing data transmission pressure big, can be respectively the file of each department's preset rules Uplink time, if current time belongs to the file uplink time of the department, the user of the department can go up transmitting file extremely immediately Otherwise server postpones or refuses the operation of upper transmitting file.It, then can will for example, a total of A-G of operation system totally 7 departments It is divided into each week 7 days, only allows transmitting file in some department therein daily.
Further, the present embodiment can with the following steps are included:
(1) the corresponding user of each identity total quantity of upper transmitting file and/or total in predetermined period is counted respectively Size;
(2) total quantity and/or total size of transmitting file on according to the corresponding user of each identity in predetermined period Adjust the corresponding file uplink time of each identity.
Specifically, can count the identity in one month for some identity and correspond to user's upload text Total quantity/total size of part and total quantity/total size of the upper transmitting file of all users obtain the body by the former divided by the latter Part identifies quantity/size of the upper transmitting file of corresponding user, is then the file of identity distribution and the ratio match Uplink time.For example, the ratio that department party A-subscriber uploads quantity of documents is 30%, the ratio that department party B-subscriber uploads quantity of documents is 10%, the ratio that department C user uploads quantity of documents is 60%, then can be by time of a cycle (such as one month or one A week) according to duration 30%, 10% and 60% three parts are assigned as, correspond respectively to the user of department A, B and C.
207, the file to be uploaded is uploaded to by server by the transmitting assembly;
Current time belongs to the corresponding file uplink time of the identity, at this time will be described by the transmitting assembly File to be uploaded is uploaded to server.
208, after waiting the corresponding file uplink time of the identity to reach, then will be described by the transmitting assembly File to be uploaded is uploaded to server;
Current time is not belonging to the corresponding file uplink time of the identity, waits the identity corresponding at this time File uplink time reach after, then the file to be uploaded is uploaded to by server by the transmitting assembly.
209, the file to be uploaded is uploaded to server by refusal.
The file to be uploaded does not meet the file and uploads condition, refuses the file to be uploaded being uploaded to clothes at this time Business device.
The present embodiment obtains the use currently logged in client after determining that file to be uploaded meets file upload condition The identity at family further judges whether current time belongs to the corresponding file uplink time of the identity, if currently Time belongs to the corresponding file uplink time of the identity, then passes through the transmitting assembly immediately for the file to be uploaded It is uploaded to server;If current time is not belonging to the corresponding file uplink time of the identity, the identity mark is waited Know after corresponding file uplink time reaches, then the file to be uploaded is uploaded to by server by the transmitting assembly.With One embodiment of the invention is compared, and the file transmission pressure of server end has been effectively relieved.
It should be understood that the size of the serial number of each step is not meant that the order of the execution order in above-described embodiment, each process Execution sequence should be determined by its function and internal logic, the implementation process without coping with the embodiment of the present invention constitutes any limit It is fixed.
A kind of method that file uploads is essentially described above, is below retouched the device uploaded to a kind of file in detail It states.
Referring to Fig. 3, a kind of one embodiment for the device that file uploads in the embodiment of the present invention includes:
File acquisition module 301, for obtaining file to be uploaded;
Condition configuration parameter extraction module 302, for being extracted from the functional configuration file of the transmitting assembly constructed in advance Condition configuration parameter;
File uploads condition determining module 303, for determining that file uploads condition according to the condition configuration parameter;
If file uploading module 304 meets the file upload condition for the file to be uploaded, on described It passes component and the file to be uploaded is uploaded to server;
If refusal uploading module 305 does not meet the file upload condition for the file to be uploaded, refuse institute It states file to be uploaded and is uploaded to server.
Further, the file uploading module may include:
Suffix acquiring unit, for obtaining the suffix name of the file to be uploaded;
File type determination unit allows to upload for judging whether the file to be uploaded belongs to according to the suffix name File type;
First judging unit, if belonging to the file type for allowing to upload for the file to be uploaded, determine it is described to Upper transmitting file meets the file and uploads condition;
Second judging unit, if being not belonging to the file type for allowing to upload for the file to be uploaded, described in judgement File to be uploaded does not meet the file and uploads condition.
Further, the file uploading module can also include:
Byte stream extraction unit, for extracting the byte stream of the file to be uploaded;
Whether detection unit has file header corresponding with suffix name mark for detecting in the byte stream;
Third judging unit, if sentencing for having file header corresponding with suffix name mark in the byte stream The fixed file to be uploaded meets the file and uploads condition;
4th judging unit, if sentencing for file header mark not corresponding with the suffix name in the byte stream The fixed file to be uploaded does not meet the file and uploads condition.
Further, the file uploading module may include:
Virus scan unit, for carrying out virus scan to the file to be uploaded;
5th judging unit, if passing through for the virus scan, and the file size of the file to be uploaded is less than institute The upper limit value for stating the restriction of functional configuration file then determines that the file to be uploaded meets the file and uploads condition;
6th judging unit, if not passing through for the virus scan or the file size of the file to be uploaded is big In the upper limit value that the functional configuration file limits, then determine that the file to be uploaded does not meet the file and uploads condition.
Further, the file uploading module may include:
Identity acquiring unit, for obtaining the identity of the user currently logged in client;
First file uploading unit, if belonging to the corresponding file uplink time of the identity for current time, The file to be uploaded is uploaded to server by the transmitting assembly;
Second file uploading unit, if being not belonging to the corresponding file uplink time of the identity for current time, After then waiting the corresponding file uplink time of the identity to reach, then pass through the transmitting assembly for the file to be uploaded It is uploaded to server.
Further, the file uploading module can also include:
Statistic unit, for counting the sum of the corresponding user of each identity upper transmitting file in predetermined period respectively Amount and/or total size;
File uplink time adjustment unit, for uploading text in predetermined period according to the corresponding user of each identity The total quantity and/or total size of part adjust the corresponding file uplink time of each identity.
Further, the condition configuration parameter includes that file is uploaded to the root of server and for starting the date The marker bit of catalogue, the file uploading module may include:
First file storing unit, if being the first numerical value for the marker bit, creation is under the root to work as The file of its date name, and the file to be uploaded is saved to the file;
Second file storing unit, if for the marker bit be second value, by the file to be uploaded save to In the default folder being pre-created under the root.
The embodiment of the present invention also provides a kind of computer readable storage medium, and the computer-readable recording medium storage has Computer-readable instruction realizes any one text indicated such as Fig. 1 or Fig. 2 when the computer-readable instruction is executed by processor The step of method that part uploads.
The embodiment of the present invention also provides a kind of server, including memory, processor and storage are in the memory And the computer-readable instruction that can be run on the processor, the processor are realized when executing the computer-readable instruction The step of method uploaded such as Fig. 1 or Fig. 2 any one file indicated.
Fig. 4 is the schematic diagram for the server that one embodiment of the invention provides.As shown in figure 4, the server 4 of the embodiment wraps It includes: processor 40, memory 41 and being stored in the computer that can be run in the memory 41 and on the processor 40 Readable instruction 42.The processor 40 realizes that above-mentioned each file uploads method when executing the computer-readable instruction 42 is real Apply the step in example, such as step 101 shown in FIG. 1 is to 106.Alternatively, the processor 40 executes the computer-readable finger The function of each module/unit in above-mentioned each Installation practice, such as the function of module 301 to 305 shown in Fig. 3 are realized when enabling 42.
Illustratively, the computer-readable instruction 42 can be divided into one or more module/units, one Or multiple module/units are stored in the memory 41, and are executed by the processor 40, to complete the present invention.Institute Stating one or more module/units can be the series of computation machine readable instruction section that can complete specific function, the instruction segment For describing implementation procedure of the computer-readable instruction 42 in the server 4.
The server 4 can be desktop PC, notebook, palm PC and cloud server etc. and calculate equipment. The server 4 may include, but be not limited only to, processor 40, memory 41.It will be understood by those skilled in the art that Fig. 4 is only It is the example of server 4, does not constitute the restriction to server 4, may include than illustrating more or fewer components or group Close certain components or different components, for example, the server 4 can also include input-output equipment, network access equipment, Bus etc..
The processor 40 can be central processing unit (CentraL Processing Unit, CPU), can also be Other general processors, digital signal processor (DigitaL SignaL Processor, DSP), specific integrated circuit (AppLication Specific Integrated Circuit, ASIC), ready-made programmable gate array (FieLd- ProgrammabLe Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic, Discrete hardware components etc..General processor can be microprocessor or the processor is also possible to any conventional processor Deng.
The memory 41 can be the internal storage unit of the server 4, such as the hard disk or memory of server 4. The memory 41 is also possible to the External memory equipment of the server 4, such as the plug-in type being equipped on the server 4 is hard Disk, intelligent memory card (Smart Media Card, SMC), secure digital (Secure DigitaL, SD) card, flash card (FLash Card) etc..Further, the memory 41 can also both include the internal storage unit of the server 4 or wrap Include External memory equipment.The memory 41 is for storing needed for the computer-readable instruction and the server other Program and data.The memory 41 can be also used for temporarily storing the data that has exported or will export.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description, The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated unit is realized in the form of SFU software functional unit and sells or use as independent product When, it can store in a computer readable storage medium.Based on this understanding, technical solution of the present invention is substantially The all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other words It embodies, which is stored in a storage medium, including some instructions are used so that a computer Equipment (can be personal computer, server or the network equipment etc.) executes the complete of each embodiment the method for the present invention Portion or part steps.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (ROM, Read-OnLy Memory), random access memory (RAM, Random Access Memory), magnetic or disk etc. are various can store journey The medium of sequence code.
The above, the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although referring to before Stating embodiment, invention is explained in detail, those skilled in the art should understand that: it still can be to preceding Technical solution documented by each embodiment is stated to modify or equivalent replacement of some of the technical features;And these It modifies or replaces, the spirit and scope for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution.

Claims (10)

1. a kind of method that file uploads characterized by comprising
Obtain file to be uploaded;
The extraction conditions configuration parameter from the functional configuration file of the transmitting assembly constructed in advance;
Determine that file uploads condition according to the condition configuration parameter;
It, will be on the file to be uploaded by the transmitting assembly if the file to be uploaded, which meets the file, uploads condition Reach server;
If the file to be uploaded does not meet the file and uploads condition, the file to be uploaded is uploaded to service by refusal Device.
2. the method that file according to claim 1 uploads, which is characterized in that whether the file to be uploaded meets described File uploads condition and is determined by following steps:
Obtain the suffix name of the file to be uploaded;
Judge whether the file to be uploaded belongs to the file type for allowing to upload according to the suffix name;
If the file to be uploaded belongs to the file type for allowing to upload, determine that the file to be uploaded meets on the file Biography condition;
If the file to be uploaded is not belonging to the file type for allowing to upload, determine that the file to be uploaded does not meet the text Part uploads condition.
3. the method that file according to claim 2 uploads, which is characterized in that if the file to be uploaded, which belongs to, to be allowed The file type of biography, then before determining that the file to be uploaded meets the file upload condition, further includes:
Extract the byte stream of the file to be uploaded;
Whether detect has file header corresponding with suffix name mark in the byte stream;
If having file header corresponding with suffix name mark in the byte stream, determine that the file to be uploaded meets institute It states file and uploads condition;
If file header mark not corresponding with the suffix name, determines that the file to be uploaded is not met in the byte stream The file uploads condition.
4. the method that file according to claim 1 uploads, which is characterized in that whether the file to be uploaded meets described File uploads condition and is determined by following steps:
Virus scan is carried out to the file to be uploaded;
If the virus scan passes through, and the file size of the file to be uploaded is less than the upper of functional configuration file restriction Limit value then determines that the file to be uploaded meets the file and uploads condition;
If the virus scan does not pass through or the file size of the file to be uploaded is limited greater than the functional configuration file Upper limit value, then determine that the file to be uploaded does not meet the file and uploads condition.
5. the method that file according to any one of claim 1 to 4 uploads, which is characterized in that described by described The file to be uploaded is uploaded to server and includes: by biography component
Obtain the identity of the user currently logged in client;
It, will be described to upper by the transmitting assembly if current time belongs to the corresponding file uplink time of the identity Transmitting file is uploaded to server;
If current time is not belonging to the corresponding file uplink time of the identity, the corresponding text of the identity is waited After part uplink time reaches, then the file to be uploaded is uploaded to by server by the transmitting assembly.
6. the method that file according to claim 5 uploads, which is characterized in that further include:
The total quantity and/or total size of the corresponding user of each identity upper transmitting file in predetermined period are counted respectively;
According to the corresponding user of each identity, the total quantity of upper transmitting file and/or total size adjustment are each in predetermined period The corresponding file uplink time of identity.
7. the method that file according to any one of claim 1 to 4 uploads, which is characterized in that the condition configuration ginseng Number is uploaded to the root of server and the marker bit for starting date catalogue comprising file, described to pass through the upload group The file to be uploaded is uploaded to server by part
If the marker bit is the first numerical value, the creation file that the date is named on the day of under the root, and by institute File to be uploaded is stated to save to the file;
If the marker bit is second value, the default being pre-created under the file to be uploaded is saved to the root In file.
8. a kind of computer readable storage medium, the computer-readable recording medium storage has computer-readable instruction, special Sign is, is realized on the file as described in any one of claims 1 to 7 when the computer-readable instruction is executed by processor The step of method of biography.
9. a kind of server, including memory, processor and storage can transport in the memory and on the processor Capable computer-readable instruction, which is characterized in that the processor realizes following steps when executing the computer-readable instruction:
Obtain file to be uploaded;
The extraction conditions configuration parameter from the functional configuration file of the transmitting assembly constructed in advance;
Determine that file uploads condition according to the condition configuration parameter;
It, will be on the file to be uploaded by the transmitting assembly if the file to be uploaded, which meets the file, uploads condition Reach server;
If the file to be uploaded does not meet the file and uploads condition, the file to be uploaded is uploaded to service by refusal Device.
10. server according to claim 9, which is characterized in that whether the file to be uploaded meets on the file Biography condition is determined by following steps:
Obtain the suffix name of the file to be uploaded;
Judge whether the file to be uploaded belongs to the file type for allowing to upload according to the suffix name;
If the file to be uploaded belongs to the file type for allowing to upload, determine that the file to be uploaded meets on the file Biography condition;
If the file to be uploaded is not belonging to the file type for allowing to upload, determine that the file to be uploaded does not meet the text Part uploads condition.
CN201811018220.1A 2018-09-03 2018-09-03 A kind of method, storage medium and server that file uploads Pending CN109361731A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811018220.1A CN109361731A (en) 2018-09-03 2018-09-03 A kind of method, storage medium and server that file uploads

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811018220.1A CN109361731A (en) 2018-09-03 2018-09-03 A kind of method, storage medium and server that file uploads

Publications (1)

Publication Number Publication Date
CN109361731A true CN109361731A (en) 2019-02-19

Family

ID=65350468

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811018220.1A Pending CN109361731A (en) 2018-09-03 2018-09-03 A kind of method, storage medium and server that file uploads

Country Status (1)

Country Link
CN (1) CN109361731A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112347041A (en) * 2020-11-03 2021-02-09 紫光云引擎科技(苏州)有限公司 Industrial cloud application store system file uploading security scanning method and system
CN112738085A (en) * 2020-12-28 2021-04-30 深圳前海微众银行股份有限公司 File security verification method, device, equipment and storage medium
CN112738249A (en) * 2020-12-30 2021-04-30 平安证券股份有限公司 File uploading method, device, equipment and storage medium based on quantitative transaction
CN113051224A (en) * 2021-04-08 2021-06-29 平安国际智慧城市科技股份有限公司 File transmission method and device, electronic equipment and computer readable storage medium
CN113641999A (en) * 2021-08-27 2021-11-12 四川中电启明星信息技术有限公司 Automatic file type checking method in WEB system file uploading process
CN113890872A (en) * 2021-09-07 2022-01-04 深圳Tcl新技术有限公司 Data set uploading method and device, electronic equipment and storage medium
CN113905041A (en) * 2021-10-11 2022-01-07 中国银行股份有限公司 File uploading method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102622537A (en) * 2011-01-31 2012-08-01 中兴通讯股份有限公司 Method and device for processing virus file
CN102868765A (en) * 2012-10-09 2013-01-09 乐视网信息技术(北京)股份有限公司 Method and system for uploading files
CN103220352A (en) * 2013-04-15 2013-07-24 福建伊时代信息科技股份有限公司 Terminal, server, file storage system and file storage method
WO2015008300A2 (en) * 2013-07-19 2015-01-22 Parag Kulkarni A system for instance specific, device-specific, duration-specific, view-specific, time-stamp-specific, and network specific, file/content sharing

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102622537A (en) * 2011-01-31 2012-08-01 中兴通讯股份有限公司 Method and device for processing virus file
CN102868765A (en) * 2012-10-09 2013-01-09 乐视网信息技术(北京)股份有限公司 Method and system for uploading files
CN103220352A (en) * 2013-04-15 2013-07-24 福建伊时代信息科技股份有限公司 Terminal, server, file storage system and file storage method
WO2015008300A2 (en) * 2013-07-19 2015-01-22 Parag Kulkarni A system for instance specific, device-specific, duration-specific, view-specific, time-stamp-specific, and network specific, file/content sharing

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112347041A (en) * 2020-11-03 2021-02-09 紫光云引擎科技(苏州)有限公司 Industrial cloud application store system file uploading security scanning method and system
CN112738085A (en) * 2020-12-28 2021-04-30 深圳前海微众银行股份有限公司 File security verification method, device, equipment and storage medium
CN112738085B (en) * 2020-12-28 2023-08-08 深圳前海微众银行股份有限公司 File security verification method, device, equipment and storage medium
CN112738249A (en) * 2020-12-30 2021-04-30 平安证券股份有限公司 File uploading method, device, equipment and storage medium based on quantitative transaction
CN112738249B (en) * 2020-12-30 2023-11-21 平安证券股份有限公司 File uploading method, device, equipment and storage medium based on quantitative transaction
CN113051224A (en) * 2021-04-08 2021-06-29 平安国际智慧城市科技股份有限公司 File transmission method and device, electronic equipment and computer readable storage medium
CN113641999A (en) * 2021-08-27 2021-11-12 四川中电启明星信息技术有限公司 Automatic file type checking method in WEB system file uploading process
CN113890872A (en) * 2021-09-07 2022-01-04 深圳Tcl新技术有限公司 Data set uploading method and device, electronic equipment and storage medium
CN113890872B (en) * 2021-09-07 2024-03-12 深圳Tcl新技术有限公司 Data set uploading method and device, electronic equipment and storage medium
CN113905041A (en) * 2021-10-11 2022-01-07 中国银行股份有限公司 File uploading method and device
CN113905041B (en) * 2021-10-11 2024-04-16 中国银行股份有限公司 File uploading method and device

Similar Documents

Publication Publication Date Title
CN109361731A (en) A kind of method, storage medium and server that file uploads
US9305055B2 (en) Method and apparatus for analysing data packets
CN108259553A (en) The sending method and terminal device of business mail
CN106100902A (en) High in the clouds index monitoring method and apparatus
CN104899016B (en) Allocating stack Relation acquisition method and device
CN113269547B (en) Data processing method, device, electronic equipment and storage medium
CN108540431A (en) The recognition methods of account type, device and system
CN109815214B (en) Database access method, system, device and storage medium
WO2019051948A1 (en) Method, apparatus, server, and storage medium for processing monitoring data
US10893091B2 (en) Management of asynchronous content post and media file transmissions
CN108768929A (en) The analytic method and storage medium of electronic device, reference feedback message
CN103077107B (en) A kind of data maintaining method and system
CN116107846B (en) Linux system event monitoring method and device based on EBPF
CN108512898A (en) File push method, apparatus, computer equipment and storage medium
CN108920691A (en) Management method, device, computer equipment and the storage medium of front end static resource
CN104994219A (en) Data processing method and system
CN107644161A (en) Safety detecting method, device and the equipment of sample
CN114218156A (en) Data export method, data export device, computer equipment and storage medium
CN106936904A (en) A kind of picture upload method and device
CN107908710A (en) A kind of file reception management method, device, terminal device and storage medium
CN111193700B (en) Safety protection method, safety protection device and storage medium
CN111209171B (en) Closed loop handling method and device for security risk and storage medium
Racka Apache Nifi As A Tool For Stream Processing Of Measurement Data
CN116304458B (en) Method, device, equipment and medium for web page real-time notification update
CN116431344A (en) Configuration method and device of financial service resource degradation strategy and electronic equipment

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190219