CN116032906A - Method and device for constructing file sharing service, using method and server - Google Patents

Method and device for constructing file sharing service, using method and server Download PDF

Info

Publication number
CN116032906A
CN116032906A CN202211520583.1A CN202211520583A CN116032906A CN 116032906 A CN116032906 A CN 116032906A CN 202211520583 A CN202211520583 A CN 202211520583A CN 116032906 A CN116032906 A CN 116032906A
Authority
CN
China
Prior art keywords
image
file
server
web
web application
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
CN202211520583.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.)
BOE Technology Group Co Ltd
Original Assignee
BOE Technology Group Co 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 BOE Technology Group Co Ltd filed Critical BOE Technology Group Co Ltd
Priority to CN202211520583.1A priority Critical patent/CN116032906A/en
Publication of CN116032906A publication Critical patent/CN116032906A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a method and a device for constructing file sharing service, a using method and a server, wherein the constructing method of one embodiment comprises the following steps: generating a web application program, wherein the web application program forms a front-end application through a code frame to realize uploading of files, and realizes online viewing and downloading through a server; and packaging the web application program, the construction tool image and the development tool package image corresponding to the web application program and the server image through an image packaging tool to generate a web file service image. The embodiment of the invention develops the web application program based on the code frame, packages the web application program and the corresponding running environment into the web file service image by using the image packaging tool, thereby being capable of being directly deployed in an internal network environment on the basis of realizing the file sharing service, having the advantages of light weight and low cost and having practical application prospect.

Description

Method and device for constructing file sharing service, using method and server
Technical Field
The present invention relates to the field of software development, and in particular, to a method and apparatus for constructing a file sharing service, a method for using the file sharing service, a server, a computer device, and a storage medium.
Background
In a daily office environment, there are situations where internal material needs to be shared within an organization, including but not limited to documents, pictures, video and audio files. In the prior art, a distributed file storage system is generally used, for example, mongDB, minIO and the like are used for realizing the requirements, professional technicians are required to carry out complex development and configuration, and the defects of high development and maintenance cost are overcome; on the other hand, the cloud service of the third party is selected for implementation, the related service is purchased with additional investment cost, and potential safety hazards exist for confidential internal data.
Therefore, how to safely, lightweight, low-cost and scalable realize internal data sharing is a technical problem to be solved by those skilled in the art.
Disclosure of Invention
To solve at least one of the above problems, a first aspect of the present invention provides a method for constructing a file sharing service, including:
generating a web application program, wherein the web application program forms a front-end application through a code frame to realize uploading of files, and realizes online viewing and downloading through a server;
and packaging the web application program, the construction tool image and the development tool package image corresponding to the web application program and the server image through an image packaging tool to generate a web file service image.
Further, the web application program forms a front-end application through a code framework to realize uploading of the file further comprises:
the web application forms a front-end application through a swagger code framework to realize uploading of the file.
Further, the implementing online viewing and downloading by the server further includes: and realizing online viewing and downloading of the file through Nginx or Tomcat.
Further, the step of packaging the web application program, the build tool image and the development tool package image corresponding to the web application program, and the server image by the image packaging tool to generate a web file service image further includes:
building the web application program through a building tool executing a building instruction to obtain a building package, wherein the building tool is obtained by loading a building tool image;
merging the build package and the development kit image to the server image;
adding configuration information of the web application to the server image;
and packaging the server image through the image packaging tool to generate a web file service image.
Further, the step of packaging the server image by the image packaging tool to generate a web file service image further includes:
the server image is customized using Dockerfile to generate the web file service image.
A second aspect of the present invention provides a method for using a web file service image constructed by the method for constructing the first aspect of the present invention, which is applied to a server, and includes:
loading a web file service mirror image by a server;
the server initiates a web application to form a file service access link;
and the server responds to the operation of the user on the file service access link, and performs file uploading through a front-end application formed by a code frame or performs file browsing and downloading through the server.
Further, the front-end application formed by the code framework further includes:
the server receives at least one file and acquires a file identifier of each file;
and the server respectively judges whether the corresponding file is stored according to each file identifier, and if the corresponding file is not stored, the corresponding file is stored.
Further, after the server receives at least one file and obtains the file identifier of each file, the server respectively judges whether the corresponding file is stored according to each file identifier, and before the corresponding file is stored if not, the using method further comprises the steps of:
the server judges whether a storage path for storing the at least one file exists or not, and if the storage path does not exist, a new storage path is created.
A third aspect of the present invention provides a construction apparatus for a file sharing service, comprising a program generating unit and an image generating unit, wherein
The program generating unit is configured to generate a web application program, wherein the web application program forms a front-end application through a code frame to realize uploading of a file, and realizes online viewing and downloading through a server;
the image generating unit is configured to generate a web file service image by packaging the web application, a build tool image and a development tool package image corresponding to the web application, and a server image through an image packaging tool.
A fourth aspect of the present invention provides a server comprising a controller configured to:
loading a web file service image, wherein the web file service image is constructed by applying the construction method provided by the first aspect of the invention;
launching a web application to form a file service access link;
and responding to the operation of the user on the file service access link, and uploading the file through a front-end application formed by the code framework or browsing and downloading the file through a server.
A fifth aspect of the present invention provides a computer-readable storage medium, having stored thereon a computer program,
the program when executed by a processor implements a construction method as provided by the first aspect of the invention;
or alternatively
The program, when executed by a processor, implements the method of use as provided by the second aspect of the invention.
A sixth aspect of the invention provides a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor,
the processor, when executing the program, implements the construction method as provided in the first aspect of the present invention; or alternatively
The processor, when executing the program, implements the method of use as provided in the second aspect of the invention.
The beneficial effects of the invention are as follows:
aiming at the existing problems at present, the invention establishes a construction method, a construction device, a use method and a server of file sharing service, wherein the construction method develops a web application program based on a code frame, and packages the web application program and corresponding running environment into a web file service mirror image by using a mirror image packaging tool. The embodiment can be directly deployed in the internal network environment on the basis of realizing the file sharing service, specifically, the image can be directly deployed in the internal network environment through the web file service without exposing the internal document data in a third party server, and has higher safety and reliability. Furthermore, when the constructed web file service mirror image is used, the web file service mirror image can be deployed to a common office computer by one key in an intranet without purchasing expensive server hardware, and the web file service mirror image has the advantages of light weight and low cost.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart illustrating a method of constructing a file sharing service according to an embodiment of the present invention;
FIG. 2 illustrates a flow diagram for generating a web file service image in accordance with one embodiment of the present invention;
FIG. 3 shows a flow chart of a method of use according to one embodiment of the invention;
FIG. 4 is a diagram of a file upload front end interface according to an embodiment of the present invention;
FIG. 5 is a diagram of a file browsing and downloading front-end interface according to one embodiment of the present invention;
FIG. 6 shows a block diagram of a build apparatus according to one embodiment of the invention;
fig. 7 is a schematic structural diagram of a computer device according to another embodiment of the present invention.
Detailed Description
In order to more clearly illustrate the present invention, the present invention will be further described with reference to preferred embodiments and the accompanying drawings. Like parts in the drawings are denoted by the same reference numerals. It is to be understood by persons skilled in the art that the following detailed description is illustrative and not restrictive, and that this invention is not limited to the details given herein.
Aiming at the problems that the file data sharing in the private domain environment has complex architecture, high development and maintenance cost, inconvenient exposure of internal data to a third party platform and difficult expansion, the prior art aims at solving the problems that the private domain environment comprises but is not limited to a secret-related environment, an intranet environment and the like. If the internal data is shared by using a traditional cloud service mode, the internal data needs to be stored in a server of a third party through the internet, and potential safety hazards exist, particularly, for confidential data with higher security, the internal data needs to be shared in an internal network isolated from the internet, for example, the internal data can not meet the requirement of sharing the file data in a private environment due to the potential safety hazards through the cloud service of the third party and file sharing products provided by commercial companies.
On the other hand, the common practice of document storage in the prior art is based on MongDB or MinIO and other weight-class product realization, and the scheme has higher requirements on technicians in the development, deployment and maintenance stages, and considering that most enterprises and public institutions do not have corresponding technicians, are inconvenient to manage internal resources by third-party technicians, cannot perform customized development at any time and do not want to put into huge cost for development and maintenance.
Aiming at the situation, the inventor has proposed through a great deal of research and experiments that, compared with the requirement of internal file data sharing in a vast private domain environment, the solution based on MongDB or MinIO in the prior art has the defects that the solution is too complex, needs professional technicians to develop and maintain, has high cost and is not easy to expand.
According to the above-described problems and the causes of the problems, as shown in fig. 1, an embodiment of the present invention provides a method for constructing a file sharing service, including: and generating a web application program, wherein the web application program forms a front-end application through a code frame to realize uploading of a file, realizes online viewing and downloading through a server, packages the web application program, a construction tool image and a development tool package image corresponding to the web application program through an image packaging tool, and packages the server image to generate a web file service image.
In this embodiment, the web application, the server, and the related tools are integrated into one web file service image, and any computer capable of allowing a Docker to implement one-key loading of the web file service image can run the web application without having to be skilled by a technician of a distributed, heavy-weight file service development technology, and even by using an idle office computer. Therefore, the construction method disclosed by the embodiment has the advantages of simple and light architecture, low development and maintenance cost, no need of professional technicians and professional server equipment, and the web application program can realize file data sharing in a private domain environment by using the existing office computer and even a low-configuration idle computer, does not need to store internal file data in third party equipment through the Internet, and has higher safety, reliability and practicability.
In an alternative embodiment, the web application forms a front-end application through a code framework to enable uploading of a file further includes: the web application forms a front-end application through a swagger code framework to realize uploading of the file.
In this embodiment, a swagger code framework is utilized, and a document and a front-end interface of a related interface are generated by embedding annotations in source code, and a front-end program matched with a back-end interface is generated. Therefore, the method for constructing the file sharing service has the following advantages:
firstly, front-end developers and related art staff are not required to be input, so that development cost is effectively reduced;
secondly, as the front-end code is automatically generated by a swagger code frame based on the annotation in the interface code, the problem that documents and codes are not uniform commonly existing in actual engineering practice is effectively solved, program bug caused by manual misoperation is effectively avoided, and the development stability and efficiency are effectively improved;
thirdly, the page generated by utilizing the swagger code frame can be tested, the test work is not required to be started after each module of the system is integrated, and after a certain interface is developed, the unit test can be started, so that the test cost is effectively reduced, and the test efficiency is improved.
In an alternative embodiment, the implementing on-line viewing and downloading by the server further includes: and realizing online viewing and downloading of the file through Nginx or Tomcat.
In this embodiment, a stable and lightweight server is selected as an operation container of the web application program, for example, web middleware such as nginnx and Tomcat is used, complex configuration and deployment operations are not required, a third party cloud service is not required, a dedicated server configured at a high end is not required, and file sharing service can be built in a private domain environment, so that deployment and maintenance costs are effectively reduced.
In an alternative embodiment, the packaging the web application, the build tool image and the development tool package image corresponding to the web application, and the server image by the image packaging tool to generate the web file service image further comprises: building the web application program through a building tool executing a building instruction to obtain a building package, wherein the building tool is obtained by loading a building tool image; merging the build package and the development kit image to the server image; adding configuration information of the web application to the server image; and packaging the server image through the image packaging tool to generate a web file service image.
In this embodiment, the construction tool selects a lightweight maven tool set, and realizes automatic management of project construction and dependency management based on Java technology. Illustrated as a specific example, as shown in fig. 2, specifically includes:
first, the web application is built to obtain a build package by executing build instructions by a build tool that is obtained for loading the build tool image.
In the embodiment, a construction tool image and a development tool package image are obtained under a Docker platform, wherein the construction tool image is a maven image, and the development tool package image is a JDK image; acquiring Java source codes of the web application program, wherein the Java source codes comprise notes of each interface; building the web application program through a building tool executing building instructions to obtain a building package, wherein the building instructions are as follows: mvn clean install; the construction package is a jar package.
Second, the build package and the development kit image are merged into the server image.
In this embodiment, merging the build package and the development kit image into the server image specifically includes: obtaining a server image, wherein the server image is an nginx image, and copying the obtained jar packet and the JDK in the JDK image into the nginx image.
Again, configuration information for the web application is added to the server image.
In this embodiment, adding configuration information of the web application to the server image specifically includes: the configuration information of the web application program is a command for starting the jar packet, an environment variable, the configuration information of the nginx and a port number.
And finally, packaging the server image through the image packaging tool to generate a web file service image.
In this embodiment, the web file service image is generated by packaging the server image by the image packaging tool.
The embodiment encapsulates the building package, the execution instruction, the running environment and the configuration information of the web application program into the web file service image based on the Docker platform. In practical application, only a Docker environment is installed on a computer needing to run the web file service according to the embodiment, and then one-key deployment and running of the web file service can be realized through one instruction. Compared with the realization scheme of products based on MongDB or MinIO and other weight levels in the prior art, the method has the advantages that a complex distributed server environment is not required to be constructed, special professional technicians are not required to be equipped, expensive server hardware is not required to be purchased, and uploading, browsing and downloading of internal data files can be safely, lightweight and low-cost and expandable in a private domain environment.
In an alternative embodiment, said packaging the server image by the image packaging tool to generate a web file service image further includes: the server image is customized using Dockerfile to generate the web file service image.
In this embodiment, the core content of the server image may be clearly and intuitively described through the Dockerfile file, and the server and the web file service may be integrated, so that the server image may be built only through one docker instruction, for example, a docker build instruction.
The construction of the file sharing service in the embodiment is completed, and the web file service mirror image constructed in the embodiment has the advantages of light weight, easiness in deployment and high safety and cost. The construction method provided by the embodiment is based on a code frame to develop a web application program, and the web application program and a corresponding running environment are packaged into a web file service image by using an image packaging tool. The web file service mirror image can be directly deployed in an internal network environment without exposing internal document data in a third party server, and has higher safety and reliability; based on the Docker operation environment, the method can realize one-key deployment to a common office computer on an intranet without purchasing expensive server hardware, and effectively reduce the construction cost of intranet file sharing service; meanwhile, the self-grinding web application program can be expanded at any time according to the change of the demand, and has wide application prospect.
Corresponding to the method for constructing a file sharing service provided in the above embodiment, an embodiment of the present application further provides a construction apparatus using the above construction method, as shown in fig. 6, including a program generating unit and a mirror image generating unit, where
The program generating unit is configured to generate a web application program, wherein the web application program forms a front-end application through a code frame to realize uploading of a file, and realizes online viewing and downloading through a server; the image generating unit is configured to generate a web file service image by packaging the web application, a build tool image and a development tool package image corresponding to the web application, and a server image through an image packaging tool.
The construction device provided by the embodiment develops the web application program based on the program generating unit according to the code frame, and packages the web application program and the corresponding running environment into the web file service image by using the image packaging tool of the image generating unit. The construction device of the embodiment has the advantages of simple and light architecture, low development and maintenance cost, no need of professional technicians and professional server equipment, realization of file data sharing in a private domain environment by using the existing office computer and even a low-configuration idle computer, no need of storing internal file data in third party equipment through the Internet, and higher safety, reliability and practicability. Since the construction apparatus provided in the embodiment of the present application corresponds to the construction method provided in the above-described several embodiments, the previous embodiment is also applicable to the construction apparatus provided in the embodiment, and will not be described in detail in the embodiment.
As shown in fig. 3, the application further provides a method for using the web file service image, which is applied to a server and includes: loading a web file service mirror image by a server; the server initiates a web application to form a file service access link; and the server responds to the operation of the user on the file service access link, and performs file uploading through a front-end application formed by a code frame or performs file browsing and downloading through the server.
In the embodiment, when the constructed web file service mirror image is used, the web file service mirror image can be deployed to a common office computer by one key in an intranet without purchasing expensive server hardware through a dock operation environment, and the method has the advantages of light weight and low cost.
In one specific example, the specific description is made by the steps of:
first, a web file service image is loaded using a server.
In this embodiment, a computer is selected as a server, and an operating system installed on the computer may be a Windows system, a Linux system, or a MacOS system, and a Docker environment corresponding to the operating system is installed.
In this embodiment, considering that the hardware configuration of an office computer is generally not high in a common office environment, the method for constructing a file sharing service disclosed by the invention selects a lightweight and extensible technical scheme to complete development, packages the web application program and related operation environment into a web file service mirror image based on a Docker environment, and can realize an operation system compatible with a mainstream by virtue of the Docker environment and the cross-platform advantage of Java language, wherein the requirement on the hardware configuration of a server is low, and even a card type computer can smoothly operate the web file service mirror image constructed in this embodiment.
Second, a web application is launched using a server to form a file service access link.
In this embodiment, the web application is launched by the server to form the file service access link. The web application program can be automatically started after the server is started based on the shell script technology. Unlike the existing distributed-based document storage service, the web application program of the embodiment is started, and can be automatically started by one key without complex operation instructions and hierarchical relations, so that the web application program has high usability.
And finally, based on the operation of responding to the file service access link by the server, uploading the file through a front-end application formed by the code frame, or browsing and downloading the file through the server.
In this embodiment, a user can use the web application program of the present invention through any computer device with a browser, such as a computer, a mobile phone, a tablet, etc., for example, upload files, browse files online, and download files, which has wide applicability. Specifically, the user inputs the intranet access address of the web application program by using the computer device with the browser function, the browser displays the file browsing and downloading interface shown in fig. 5, and after clicking the upload button, the user displays the file uploading interface shown in fig. 4. The uploading of the file is performed according to the method shown in fig. 3, and the detailed description will not be repeated herein with reference to the foregoing embodiments.
It is worth to say that, considering the convenience of uploading the file and the uniqueness of the file, if the user is inconvenient to input a specific file name during uploading, a random unique identification code is automatically generated, so that the file name is ensured not to be repeated; when the uploading file is the same as the existing file, the user can be prompted and the uploading operation is finished, and the problem that the user searches the file to be confused due to repeated file names is effectively prevented.
In order to further improve the reliability of file uploading, in an optional embodiment, after the server receives at least one file and obtains the file identifier of each file, the server determines whether the corresponding file is stored according to each file identifier, and before storing the file if not, the using method further includes: the server judges whether a storage path for storing the at least one file exists or not, and if the storage path does not exist, a new storage path is created.
In this embodiment, to further ensure the accuracy of file uploading, when the directory specified by the user does not exist, the path can be automatically created, so that the user can complete two operations of file uploading and directory creation simultaneously through one operation.
Corresponding to the web file service image using method provided in the above embodiment, an embodiment of the present application further provides a server, including a controller configured to: loading a web file service image; launching a web application to form a file service access link; and responding to the operation of the user on the file service access link, and uploading the file through a front-end application formed by the code framework or browsing and downloading the file through a server.
The server of the embodiment can be deployed to a common office computer in an intranet one-key mode through a Docker running environment when the constructed web file service mirror image is used, expensive server hardware does not need to be purchased, the server has the advantages of light weight and low cost, and the embodiment can be expanded according to the change of requirements at any time based on a self-grinding web application program and has wide application prospects. Since the server provided in the embodiment of the present application corresponds to the web file service image using method provided in the above several embodiments, the previous implementation manner is also applicable to the server provided in the embodiment, and will not be described in detail in the embodiment.
Another embodiment of the present invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements: generating a web application program, wherein the web application program forms a front-end application through a code frame to realize uploading of files, and realizes online viewing and downloading through a server; and packaging the web application program, the construction tool image and the development tool package image corresponding to the web application program and the server image through an image packaging tool to generate a web file service image.
Another embodiment of the present invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements: loading a web file service mirror image by a server; the server initiates a web application to form a file service access link; and the server responds to the operation of the user on the file service access link, and performs file uploading through a front-end application formed by a code frame or performs file browsing and downloading through the server.
In practical applications, the computer-readable storage medium may take the form of any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this embodiment, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
As shown in fig. 7, another embodiment of the present invention provides a schematic structural diagram of a computer device. The computer device 12 shown in fig. 7 is only an example and should not be construed as limiting the functionality and scope of use of embodiments of the invention.
As shown in fig. 7, the computer device 12 is in the form of a general purpose computing device. Components of computer device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, a bus 18 that connects the various system components, including the system memory 28 and the processing units 16.
Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, and a local bus using any of a variety of bus architectures. By way of example, and not limitation, such architectures include Industry Standard Architecture (ISA) bus, micro channel architecture (MAC) bus, enhanced ISA bus, video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Computer device 12 typically includes a variety of computer system readable media. Such media can be any available media that is accessible by computer device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM) 30 and/or cache memory 32. The computer device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from or write to non-removable, nonvolatile magnetic media (not shown in FIG. 7, commonly referred to as a "hard disk drive"). Although not shown in fig. 7, a magnetic disk drive for reading from and writing to a removable non-volatile magnetic disk (e.g., a "floppy disk"), and an optical disk drive for reading from or writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In such cases, each drive may be coupled to bus 18 through one or more data medium interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to carry out the functions of embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored in, for example, memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment. Program modules 42 generally perform the functions and/or methods of the embodiments described herein.
The computer device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), one or more devices that enable a user to interact with the computer device 12, and/or any devices (e.g., network card, modem, etc.) that enable the computer device 12 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 22. Moreover, computer device 12 may also communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN) and/or a public network, such as the Internet, through network adapter 20. As shown in fig. 7, the network adapter 20 communicates with other modules of the computer device 12 via the bus 18. It should be appreciated that although not shown in fig. 7, other hardware and/or software modules may be used in connection with computer device 12, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
The processor unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, for example, implementing a method of constructing a file sharing service provided by the embodiment of the present invention or implementing a method provided by the embodiment of the present invention.
Aiming at the existing problems at present, the invention establishes a construction method, a construction device, a use method and a server of file sharing service, wherein the construction method develops a web application program based on a code frame, and packages the web application program and corresponding running environment into a web file service mirror image by using a mirror image packaging tool. The embodiment can be directly deployed in the internal network environment on the basis of realizing the file sharing service, specifically, the image can be directly deployed in the internal network environment through the web file service without exposing the internal document data in a third party server, and has higher safety and reliability. Furthermore, when the constructed web file service mirror image is used, the web file service mirror image can be deployed to a common office computer by one key in an intranet without purchasing expensive server hardware, and the web file service mirror image has the advantages of light weight and low cost.
It should be understood that the foregoing examples of the present invention are provided merely for clearly illustrating the present invention and are not intended to limit the embodiments of the present invention, and that various other changes and modifications may be made therein by one skilled in the art without departing from the spirit and scope of the present invention as defined by the appended claims.

Claims (12)

1. A method of constructing a file sharing service, comprising:
generating a web application program, wherein the web application program forms a front-end application through a code frame to realize uploading of files, and realizes online viewing and downloading through a server;
and packaging the web application program, the construction tool image and the development tool package image corresponding to the web application program and the server image through an image packaging tool to generate a web file service image.
2. The method of building of claim 1, wherein the web application forming a front-end application through a code framework to enable uploading of a file further comprises:
the web application forms a front-end application through a swagger code framework to realize uploading of the file.
3. The method of claim 1, wherein the implementing on-line viewing and downloading by the server further comprises:
and realizing online viewing and downloading of the file through Nginx or Tomcat.
4. The method of building according to claim 1, wherein said packaging the web application, the build tool image and the development tool package image corresponding to the web application, and the server image by the image packaging tool to generate a web file service image further comprises:
building the web application program through a building tool executing a building instruction to obtain a building package, wherein the building tool is obtained by loading a building tool image;
merging the build package and the development kit image to the server image;
adding configuration information of the web application to the server image;
and packaging the server image through the image packaging tool to generate a web file service image.
5. The method of claim 4, wherein said packaging the server image by the image packaging tool to generate a web file service image further comprises:
the server image is customized using Dockerfile to generate the web file service image.
6. A method of using a web document service image constructed using the construction method according to any one of claims 1 to 5, applied to a server, comprising:
loading a web file service mirror image by a server;
the server initiates a web application to form a file service access link;
and the server responds to the operation of the user on the file service access link, and performs file uploading through a front-end application formed by a code frame or performs file browsing and downloading through the server.
7. The method of claim 6, wherein the front-end application formed by the code framework further comprises:
the server receives at least one file and acquires a file identifier of each file;
and the server respectively judges whether the corresponding file is stored according to each file identifier, and if the corresponding file is not stored, the corresponding file is stored.
8. The method according to claim 7, wherein after the server receives at least one file and obtains a file identifier of each file, before the server determines whether a corresponding file has been stored according to each file identifier, and if not, the file is stored, the method further comprises:
the server judges whether a storage path for storing the at least one file exists or not, and if the storage path does not exist, a new storage path is created.
9. A file sharing service constructing apparatus includes a program generating unit and a mirror image generating unit, wherein
The program generating unit is configured to generate a web application program, wherein the web application program forms a front-end application through a code frame to realize uploading of a file, and realizes online viewing and downloading through a server;
the image generating unit is configured to generate a web file service image by packaging the web application, a build tool image and a development tool package image corresponding to the web application, and a server image through an image packaging tool.
10. A server, comprising a controller configured to:
loading a web file service image, the web file service image being built for application of the building method according to any of claims 1-5;
launching a web application to form a file service access link;
and responding to the operation of the user on the file service access link, and uploading the file through a front-end application formed by the code framework or browsing and downloading the file through a server.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that,
the program, when executed by a processor, implementing the construction method according to any one of claims 1 to 5; or alternatively
The program, when executed by a processor, implements the use of any of claims 6-8.
12. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that,
implementing the construction method according to any one of claims 1 to 5 when the processor executes the program; or alternatively
The processor, when executing the program, implements the use method according to any one of claims 6-8.
CN202211520583.1A 2022-11-30 2022-11-30 Method and device for constructing file sharing service, using method and server Pending CN116032906A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211520583.1A CN116032906A (en) 2022-11-30 2022-11-30 Method and device for constructing file sharing service, using method and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211520583.1A CN116032906A (en) 2022-11-30 2022-11-30 Method and device for constructing file sharing service, using method and server

Publications (1)

Publication Number Publication Date
CN116032906A true CN116032906A (en) 2023-04-28

Family

ID=86071607

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211520583.1A Pending CN116032906A (en) 2022-11-30 2022-11-30 Method and device for constructing file sharing service, using method and server

Country Status (1)

Country Link
CN (1) CN116032906A (en)

Similar Documents

Publication Publication Date Title
US11762634B2 (en) Systems and methods for seamlessly integrating multiple products by using a common visual modeler
CN110531962B (en) Development processing method and device for applet and computer readable storage medium
US20090199213A1 (en) Automatic Connections Between Application Components
CN109951553B (en) Data processing method, system, electronic device and computer readable storage medium
CN116305240A (en) Scalable dynamic data desensitization system and method
CN112835568A (en) Project construction method and device
CN114048415A (en) Form generation method and device, electronic equipment and computer readable storage medium
US11222164B2 (en) Adding custom content to an existing documentation suite
CN109408057B (en) Method, device, medium and computing equipment for automatically generating codes
CN116032906A (en) Method and device for constructing file sharing service, using method and server
CN112394920B (en) Application software development method, platform and electronic equipment
CN110825370A (en) Mobile terminal application development method, device and system
CN112764802A (en) Business logic customization method and device, electronic equipment and storage medium
CN113590224B (en) Method and device for detecting server, electronic equipment and storage medium
CN111880775A (en) Multi-module layered architecture implementation method and device, electronic equipment and storage medium
CN111782196A (en) MVP architecture-based development method and device
CN105183491A (en) Cross-platform desktop GIS and starting method thereof
CN113590225B (en) Mapping detection method and device, electronic equipment and storage medium
CN112068814A (en) Method, device, system and medium for generating executable file
CN113590226B (en) Method and device for starting engine editor, electronic equipment and storage medium
US11556351B1 (en) Facilitation of application containerization
CN115658276B (en) Service development method, device, electronic equipment and readable storage medium
WO2023193682A1 (en) Local arrangement of remote deployment
WO2024000917A1 (en) Non-intrusive, pluggable front-end build transfer acceleration method and apparatus
CN114924766A (en) Script construction method and device based on construction tool, computer equipment and medium

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