CN111651416A - Sketch project file uploading preview method, system, device and medium - Google Patents

Sketch project file uploading preview method, system, device and medium Download PDF

Info

Publication number
CN111651416A
CN111651416A CN202010499263.7A CN202010499263A CN111651416A CN 111651416 A CN111651416 A CN 111651416A CN 202010499263 A CN202010499263 A CN 202010499263A CN 111651416 A CN111651416 A CN 111651416A
Authority
CN
China
Prior art keywords
sketch
file
preview
project file
project
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010499263.7A
Other languages
Chinese (zh)
Other versions
CN111651416B (en
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.)
Ctrip Travel Information Technology Shanghai Co Ltd
Original Assignee
Ctrip Travel Information Technology Shanghai 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 Ctrip Travel Information Technology Shanghai Co Ltd filed Critical Ctrip Travel Information Technology Shanghai Co Ltd
Priority to CN202010499263.7A priority Critical patent/CN111651416B/en
Publication of CN111651416A publication Critical patent/CN111651416A/en
Application granted granted Critical
Publication of CN111651416B publication Critical patent/CN111651416B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/172Caching, prefetching or hoarding of files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • G06F16/168Details of user interfaces specifically adapted to file systems, e.g. browsing and visualisation, 2d or 3d GUIs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/182Distributed file systems
    • G06F16/1824Distributed file systems implemented using Network-attached Storage [NAS] architecture
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/1873Versioning file systems, temporal file systems, e.g. file system supporting different historic versions of files
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • 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]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a Sketch project file uploading preview method, a system, equipment and a medium, wherein the method comprises the following steps: uploading the Sketch project file to a storage system at a Sketch plug-in client; the Sketch plug-in generates a version identification number of the Sketch project file, and the storage system returns a file identification number; generating an online preview address of the Sketch project file according to the file identification number and the version identification number of the Sketch project file; and accessing an online preview address in the browser to preview the Sketch project file. According to the method, the Sketch project file is uploaded in the Sketch software by one key through the Sketch plug-in unit, and after the file is uploaded, the Web application can preview the Sketch file through the unique online preview address associated with the project file identification number and the version identification number, so that the design workflow is greatly simplified, and the working efficiency is improved.

Description

Sketch project file uploading preview method, system, device and medium
Technical Field
The invention relates to the field of file processing, in particular to a method, a system, equipment and a medium for uploading and previewing a Sketch project file.
Background
Sketch (Sketch) is vector drawing software designed aiming at an interface, is simple and easy to learn, has rich functions, and is commonly used in graphic design companies, internet companies and the like, but Sketch software is only suitable for a macOS (apple computer system) platform at present, and a design manuscript file can be opened only by using the Sketch software on the macOS platform, so that difficulty is brought to people who do not purchase apple computers or do not purchase Sketch software for checking manuscripts, and the Sketch software is particularly inconvenient in companies needing collaborative design of multiple colleagues.
With more and more Sketch files of each design team, the storage of the large files is more dispersed and is not beneficial to unified management. The uploading mode of these Sketch files is based on the mode of traditional FTP (File Transfer Protocol), and cannot be completed directly in Sketch software, and this File uploading mode can directly cover the same name File, and cannot save version information, and the storage platform File cannot be previewed directly.
Disclosure of Invention
The invention aims to overcome the defects that Sketch design manuscripts cannot be opened by a colleague without a macOS platform needing collaborative design and storage platform files cannot be previewed directly in the prior art, and provides a Sketch project file uploading preview method, a system, electronic equipment and a storage medium.
The invention solves the technical problems through the following technical scheme:
the invention provides a Sketch project file uploading preview method, which comprises the following steps:
uploading the Sketch project file to a storage system at a Sketch plug-in client;
the Sketch plug-in generates a version identification number of the Sketch project file, and the storage system returns a file identification number of the Sketch project file;
generating an online preview address of the Sketch project file according to the file identification number and the version identification number of the Sketch project file;
and accessing the online preview address in a browser to preview the Sketch project file.
Preferably, before uploading and storing the Sketch project file into a storage system, exporting, labeling, slicing, packaging and compressing the Sketch project file;
the Sketch project file comprises at least one of a Sketch file, a JavaScript object notation (JSON) file, a slice JSON file and a picture file generated by the Sketch file;
when the online preview address is accessed in a browser, at least one of the Sketch file, the annotation draft JSON file, the slice JSON file and a picture file generated by the Sketch file is obtained, and a preview page of the Sketch project file is loaded and generated;
and after the online preview address of the Sketch project file is generated, automatically opening a browser, jumping to the online preview address, and previewing the Sketch project file.
Preferably, the storage system comprises a system database and a Ceph (open source storage software) distributed storage system;
when the Sketch project file is uploaded and stored in a storage system, the Ceph distributed storage system stores the Sketch file according to a naming mode of sketch.uuid ═ A, stores the annotation manuscript JSON file according to a naming mode of A.pages.json, stores the slice JSON file according to a naming mode of A.pages.json, and stores the picture file according to a naming mode of A.P.png; wherein A represents the version identification number, P represents a picture document identifier, and the picture document identifier is obtained by analyzing the annotation draft JSON file and the slice JSON file;
and when the storage system returns the file identification number of the Sketch project file, the system database returns the file identification number of the Sketch project file.
Preferably, before uploading and storing the Sketch project file in the storage system, verifying the user authority of the client requesting to upload;
and/or verifying the user authority of the client requesting the preview before accessing the online address in the browser.
The invention also provides a system for uploading and previewing the Sketch project file, which comprises a file uploading module, an identification number generating module, an address generating module and a previewing module;
the file uploading module is used for uploading the Sketch project file to the storage system at the Sketch plug-in client;
the identification number generating module is used for generating a version identification number of the Sketch item file in the Sketch plug-in, and the identification number generating module is also used for returning a file identification number of the Sketch item file from the storage system;
the address generating module is used for generating an online preview address of the Sketch project file according to the file identification number and the version identification number of the Sketch project file;
and the preview module is used for accessing the online preview address in a browser and previewing the Sketch project file.
Preferably, the system for uploading and previewing the Sketch project file further comprises a preprocessing module;
before uploading and storing the Sketch project file into a storage system, the preprocessing module is used for exporting, labeling, slicing, packaging and compressing the Sketch project file;
the Sketch project file comprises at least one of a Sketch file, a markup manuscript JSON file, a slice JSON file and a picture file generated by the Sketch file;
when the online address is accessed in a browser, the preview module further acquires at least one of a Sketch file, a markup draft JSON file, a slice JSON file and a picture file generated by the Sketch file, and loads and generates a preview page of the Sketch project file; after the online preview address of the Sketch project file is generated, the preview module is further used for automatically opening a browser, jumping to the online preview address, and previewing the Sketch project file.
Preferably, the storage system comprises a system database and a Ceph distributed storage system;
the system for uploading and previewing the Sketch project file further comprises a storage module; when the Sketch project file is uploaded and stored in the Ceph storage system, the storage module stores the Sketch file according to a naming mode of sketch.uuid ═ A, the storage module stores the annotation manuscript JSON file according to a naming mode of A.pages.json, the storage module stores the slice JSON file according to a naming mode of A.pages.json, and the storage module stores the picture file according to a naming mode of A.P.png; wherein A represents the version identification number, P represents a picture document identifier, and the picture document identifier is obtained by analyzing the annotation draft JSON file and the slice JSON file;
and when the storage system returns the file identification number of the Sketch project file, the identification number generation module returns the file identification number of the Sketch project file from the system database.
Preferably, the system for uploading and previewing the Sketch project file further comprises an authority verification module; before uploading and storing the Sketch project file into a storage system, the authority verification module verifies the user authority of the client requesting to upload;
and/or before the online address is accessed in the browser, the authority verification module verifies the user authority of the client requesting the preview.
The invention also provides an electronic device, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor executes the computer program to realize the above uploading preview method of the Sketch project file.
The present invention also provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the steps of the aforementioned method for uploading a preview of a Sketch project file.
On the basis of the common knowledge in the field, the above preferred conditions can be combined randomly to obtain the preferred embodiments of the invention.
The positive progress effects of the invention are as follows: the Sketch project file is uploaded in Sketch software through a Sketch plug-in unit, and a Web (global area network) application can preview the Sketch file through a unique online preview address associated with a project file identification number and a version identification number after the file is uploaded. Furthermore, the online preview address can be accessed only by authorized users, so that the confidentiality of the project file is guaranteed, convenience is provided for different team members to check the design draft file, the design work flow is greatly simplified, and the work efficiency is improved. And the historical modification version can be checked when the Sketch file is previewed, so that the design work is quicker and more convenient.
Drawings
Fig. 1 is a flowchart of a method for previewing an upload of a Sketch project file according to embodiment 1 of the present invention.
Fig. 2 is a flowchart of a method for previewing the upload of the Sketch project file according to embodiment 2 of the present invention.
Fig. 3 is a history version interface diagram of the method for uploading and previewing the Sketch project file according to embodiment 2 of the present invention.
Fig. 4 is a schematic block diagram of a system for uploading and previewing a Sketch project file according to embodiment 3 of the present invention.
Fig. 5 is a schematic block diagram of a system for uploading and previewing a Sketch project file according to embodiment 4 of the present invention.
Fig. 6 is a schematic structural diagram of an electronic device for implementing a preview method for uploading a Sketch project file according to embodiment 5 of the present invention.
Detailed Description
The invention is further illustrated by the following examples, which are not intended to limit the scope of the invention.
Example 1
The embodiment provides an uploading preview method of a Sketch project file. As shown in fig. 1, the method comprises the steps of:
and S11, uploading the Sketch project file to the storage system at the Sketch plug-in client.
When a designer finishes the design of a Sketch project file, the Sketch plug-in client acquires current file data through interaction between the Sketch plug-in and Sketch software, selects a page to be uploaded in the uploading setting, calls an Application Programming Interface (API) Interface service to carry out uploading operation by setting other options, and uploads and stores the selected Sketch project file in a storage system.
S12, the Sketch plug-in generates the version identification number of the Sketch project file, and the storage system returns the file identification number of the Sketch project file.
After the upload is successful, the Sketch plug-in generates a version identification number of the Sketch item file, the storage system returns the file identification number of the Sketch item file, and the generated file identification number and the version identification number are written into a system database.
And S13, generating the online preview address of the Sketch project file according to the file identification number and the version identification number of the Sketch project file.
The Sketch plug-in generates an online preview address of the Sketch project file according to the returned file identification number and the version identification number of the Sketch project file. If the file identifier of a certain Sketch item file is 5e96fadfa91e5b00692a1a8e and the version identifier is 69e869a6-83ba-3fc2-bca8-7fd2b72cb237, the online preview address of the Sketch item file is https:// website domain name/Sketch/5 e96fadfa91e5b00692a1a8e/69e869a6-83ba-3fc2-bca8-7fd2b72cb 237.
And S14, accessing the online preview address in the browser and previewing the Sketch project file.
The Sktech plug-in the browser directly opens the online preview address of the Sketch project file of the Web application through the URL (Uniform Resource Locator), so that the Sketch project file can be previewed.
The embodiment uploads the Sketch project file in the Sketch software by one key through a Sketch plug-in through creating the API interface service, and the Web application can preview the Sketch file through a unique online preview address associated with the file identification number and the version identification number of the project file after the file is uploaded. The embodiment establishes a new Sketch design draft delivery development process and a visual Sketch file online preview platform, effectively solves the management problem of the dispersion of large Sketch files, enables designers to upload the sketches on a plug-in end by one key, greatly improves the efficiency of exporting and delivering the manuscripts, and reduces the time cost and communication cost of a development link even if the annotation manuscripts are directly previewed online.
Example 2
The embodiment is further optimized on the basis of the embodiment 1. As shown in fig. 2, the method for uploading and previewing the Sketch project file of the present embodiment includes the following steps:
and S21, carrying out export labeling, slicing, packaging and compression on the Sketch project file.
When a designer finishes designing a Sketch project file, firstly, exporting, slicing, packaging and compressing the Sketch project file by using a Sktech plug-in, and integrating the Sketch project file into at least one of a picture file generated by the Sketch file, a annotation draft JSON file, a slice JSON file and the Sketch file so as to be capable of being integrated into the Sketch project file again in a subsequent browsing and viewing process.
And S22, verifying the user right of the client requesting to upload.
After the Sketch project file is integrated, the API service verifies the user authority of the client through a token (token) so as to ensure that only authenticated users can upload the file to a storage system, and the confidentiality of the project is guaranteed.
And S23, uploading the Sketch project file to the Sketch distributed storage system at the Sketch plug-in client, and storing the Sketch project file in the Ceph distributed storage system.
Similar to step S11 of embodiment 1, after the Sketch project file is integrated, in the Sketch plug-in client, through interaction between the Sketch plug-in and the Sketch software, the present embodiment uploads the pictures generated by the Sketch file, the annotation script JSON file, the slice JSON file, and the Sketch file to the Ceph distributed storage system. The distributed storage system Ceph has an open API form, can be well and directly interfaced with Sketch, and is very suitable for being deployed in an enterprise.
S24, the Sketch plug-in generates the version identification number of the Sketch project file, and the system database returns the file identification number of the Sketch project file.
The storage system in this embodiment includes a system database and a Ceph distributed storage system, where the system database is used to store data of information such as a file identification number, a version identification number, an item name, and a file name, and the Ceph distributed storage system is used to physically store a large file. When the Sketch project file is uploaded and stored in the storage system, the Ceph distributed storage system receives data and stores the received file according to the rule name, and stores information such as the file name, the file identification number and the like in a system database, and then the system database returns the file identification number F of the Sketch project file. After uploading the file, the Sketch plug-in generates a version identification number A and writes the version identification number A into a system database. Where the file identifier F is used to identify the stored information of the Sketch entry file and the version identifier a is used to identify a different version of the Sketch entry file.
The Ceph distributed storage system stores Sketch files according to the naming mode of sketch.uuid.A, stores annotation draft JSON files according to the naming mode of A.pages.json, stores slice JSON files according to the naming mode of A.pages.json, and stores picture files according to the naming mode of A.P.png; and P represents a picture document identifier obtained by analyzing the annotation draft JSON file and the slice JSON file.
And S25, generating the online preview address of the Sketch project file according to the file identification number and the version identification number of the Sketch project file.
This step is the same as step S13 of embodiment 1, and is not described here again. After the online preview address of the Sketch project file is generated, there are two preview modes, namely an automatic preview mode in step S26 and a daily preview mode in step S27, and step S27 includes step S2701 and step S2702.
And S26, automatically opening the browser, jumping to an online preview address, and previewing the Sketch project file.
After the online preview address of the Sketch project file is generated, a default browser is automatically opened, the online preview address of the Web application is directly opened through URL routing, a Sketch preview page is loaded, and the Sketch project file is previewed.
S2701, verifying the user authority of the client requesting the preview.
When the Sketch project file needs to be checked in daily work, the Web application acquires a file identification number of the Sketch project file through an HTTP request, sends a preview request to an API server through an HTTP protocol, and an API interface service verifies the user permission of a client requesting the preview through token, so that the preview can be ensured only by an authenticated user, and the confidentiality of the project file is guaranteed.
S2702, the online preview address is accessed in the browser, and the Sketch project file is previewed.
The API server side inquires a system database, takes a version identification number stored in a file, calls a Ceph system interface, obtains a large file related to a project, and returns the large file to the Web client side, wherein the large file comprises at least one of a Sketch file, a mark draft JSON file, a slice JSON file and a picture generated by the Sketch file; the Web front end applies annotation draft data, pictures and slice information acquired by the API server, the Sktech plug-in the browser directly opens an online preview address of the Sktech project file through URL routing, a preview page of the Sktech project file is loaded and generated, and a user can preview the Sktech project file. Meanwhile, as shown in fig. 3, the historical version of the Sketch project file can also be displayed, so that the file of the previous version can be conveniently viewed.
In the embodiment, by creating an API (application programming interface) interface service, a Sketch project file is uploaded in Sketch software by one key through a Sketch plug-in, and a Web application can preview the Sketch file through a unique online preview address associated with a file identification number and a version identification number of the project file after the file is uploaded; the online preview address can be accessed only by authorized users, so that the confidentiality of the project file is guaranteed, convenience is provided for different team members to check the design draft file, the design work flow is greatly simplified, and the work efficiency is improved. And the historical modification version can be checked when the Sketch file is previewed, so that the design work is quicker and more convenient.
Example 3
The embodiment provides a system for uploading preview of a Sketch project file, and as shown in fig. 4, the system includes a file uploading module 1, an identification number generating module 2, an address generating module 3 and a preview module 4.
When a designer finishes the design of a Sketch project file, the Sketch plug-in client acquires current file data through interaction between the Sketch plug-in and Sketch software, selects a page to be uploaded in the uploading setting, and calls an API (application programming interface) service to upload after setting other options, wherein the file uploading module 1 is used for uploading and storing the selected Sketch project file in a storage system.
The identification number generation module 2 is used for generating the version identification number of the Sketch project file in the Sketch plug-in, and the identification number generation module 2 is also used for returning the file identification number of the Sketch project file from the storage system and writing the generated file identification number and the version identification number into the system database.
The address generating module 3 of the Sketch plug-in is used for generating the online preview address of the Sketch project file according to the file identification number and the version identification number of the returned Sketch project file. If the file identifier of a certain Sketch item file is 5e96fadfa91e5b00692a1a8e and the version identifier is 69e869a6-83ba-3fc2-bca8-7fd2b72cb237, the online preview address of the Sketch item file is https:// website domain name/Sketch/5 e96fadfa91e5b00692a1a8e/69e869a6-83ba-3fc2-bca8-7fd2b72cb 237.
And the preview module 4 of the Web application is used for accessing an online preview address in a browser and previewing the Sketch project file.
The embodiment uploads the Sketch project file in the Sketch software by one key through a Sketch plug-in through creating the API interface service, and the Web application can preview the Sketch file through a unique online preview address associated with the file identification number and the version identification number of the project file after the file is uploaded. The embodiment establishes a new Sketch design draft delivery development process and a visual Sketch file online preview platform, effectively solves the management problem of the dispersion of large Sketch files, enables designers to upload the sketches on a plug-in end by one key, greatly improves the efficiency of exporting and delivering the manuscripts, and reduces the time cost and communication cost of a development link even if the annotation manuscripts are directly previewed online.
Example 4
The present embodiment is further optimized on the basis of embodiment 3. As shown in fig. 5, the system for uploading and previewing the Sketch project file of the present embodiment further includes a preprocessing module 5, a permission verification module 6 and a storage module 7.
Before the file uploading module 1 uploads and stores the Sketch project file into the storage system, the preprocessing module 5 of the Sketch plug-in is used for exporting, labeling, slicing, packaging and compressing the Sketch project file, and integrating the Sketch project file into at least one of a Sketch file, a labeling draft JSON file, a slice JSON file and a picture file generated by the Sketch file, so that the Sketch project file can be reintegrated into the Sketch project file in a subsequent browsing and viewing process.
After the Sketch project file is integrated and before the file uploading module 1 uploads the file, the authority verification module 6 of the API interface service verifies the user authority of the client through token so as to ensure that only authenticated users can upload the file to a storage system, and the confidentiality of the project is guaranteed.
Similar to the file upload module 1 in embodiment 3, in this embodiment, after the Sketch project file is integrated, the file upload module 1 uploads and stores the pictures generated by the Sketch file, the annotation document JSON file, the slice JSON file, and the Sketch file into the Ceph distributed storage system through interaction between the Sketch plug-in and the Sketch software in the Sketch plug-in client. The distributed storage system Ceph has an open API form, can be well and directly interfaced with Sketch, and is very suitable for being deployed in an enterprise.
The storage system in this embodiment includes a system database and a Ceph distributed storage system, where the system database is used to store data of information such as a file identification number, a version identification number, an item name, and a file name, and the Ceph distributed storage system is used to physically store a large file. When the Sketch project file is uploaded and stored in the Ceph distributed storage system, the Ceph distributed storage system receives data and stores the received file according to a rule name, specifically, a storage module 7 of the Ceph distributed storage system stores the Sketch file according to a naming mode of sketch.uuid ═ A, stores a label draft JSON file according to a naming mode of A.pages.json, stores a slice JSON file according to a naming mode of A.pages.json, and stores a picture file according to a naming mode of A.P.png; wherein, A represents the version identification number of the Sketch project file, and P represents the picture document identification obtained by analyzing the annotation draft JSON file and the slice JSON file.
After the Ceph distributed storage system stores the uploaded files according to the rules, the information such as the project name, the file identification number and the like is stored in the system database, and then the identification number generation module 2 returns the file identification number F of the Sketch project file from the system database. After the Sketch plug-in completes uploading the file, the identification number generation module 2 generates a version identification number A and writes the version identification number A into a system database. Where the file identifier F is used to identify the stored information of the Sketch entry file and the version identifier a is used to identify a different version of the Sketch entry file.
The address generating module 3 of the Sketch plug-in is used for generating an online preview address of the Sketch project file according to the file identification number and the version identification number of the generated Sketch project file. If the file identifier of a certain Sketch item file is 5e96fadfa91e5b00692a1a8e and the version identifier is 69e869a6-83ba-3fc2-bca8-7fd2b72cb237, the online preview address of the Sketch item file is https:// website domain name/Sketch/5 e96fadfa91e5b00692a1a8e/69e869a6-83ba-3fc2-bca8-7fd2b72cb 237.
After the online preview address of the Sketch project file is generated, two preview modes, namely automatic preview and daily preview, exist. The automatic preview mode is that after the file is uploaded, the browser is automatically opened, the Sketch project file is previewed in the browser, and whether the uploaded file meets the requirements or not can be checked and checked. At this time, the preview module 4 of the Web application automatically opens a default browser and directly opens the online preview address of the Web application through URL routing, and obtains at least one of the Sketch file, the annotation document JSON file, the slice JSON file, and the picture file generated by the Sketch file, loads a preview page for generating the Sketch project file, and previews the Sketch project file.
The daily preview mode is that when the Sketch project file needs to be viewed in daily work, the Sketch project file is viewed in a browser after the user authority verification. At the moment, the preview module 4 of the Web application acquires the file identification number of the Sketch project file through an HTTP request, sends a preview request to the API server through an HTTP protocol, and the permission verification module 6 of the API interface service verifies the user permission of the client requesting the preview through token, so that the preview can be ensured only by an authenticated user, and the confidentiality of the project file is guaranteed. Then, the API server side inquires a system database, takes the version identification number A stored in the file, calls a Ceph system interface, obtains large files related to the project, including at least one of a Sketch file, a mark draft JSON file, a slice JSON file and pictures generated by the Sketch file, and returns the large files to the Web client side; the Web front end applies annotation draft data, pictures and slice information acquired by the API server, the preview module 4 of the Sktech plug-in directly opens an online preview address of the Sktech project file in a browser through URL routing, a preview page of the Sktech project file is loaded and generated, and a user can preview the Sktech project file. Meanwhile, as shown in fig. 3, the historical version of the Sketch project file can also be displayed, so that the file of the previous version can be conveniently viewed.
In the embodiment, by creating an API (application programming interface) interface service, a Sketch project file is uploaded in Sketch software by one key through a Sketch plug-in, and a Web application can preview the Sketch file through a unique online preview address associated with a file identification number and a version identification number of the project file after the file is uploaded; the online preview address can be accessed only by authorized users, so that the confidentiality of the project file is guaranteed, convenience is provided for different team members to check the design draft file, the design work flow is greatly simplified, and the work efficiency is improved. And the historical modification version can be checked when the Sketch file is previewed, so that the design work is quicker and more convenient.
Example 5
Fig. 6 is a schematic structural diagram of an electronic device according to embodiment 5 of the present invention. The electronic device comprises a memory, a processor and a computer program stored on the memory and operable on the processor, wherein the processor executes the program to implement the method for uploading preview of the Sktech project file of embodiment 1 or 2. The electronic device 50 shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiment of the present invention.
As shown in fig. 6, the electronic device 50 may be embodied in the form of a general purpose computing device, which may be, for example, a server device. The components of the electronic device 50 may include, but are not limited to: the at least one processor 51, the at least one memory 52, and a bus 53 connecting the various system components (including the memory 52 and the processor 51).
The bus 53 includes a data bus, an address bus, and a control bus.
The memory 52 may include volatile memory, such as Random Access Memory (RAM)521 and/or cache memory 522, and may further include Read Only Memory (ROM) 523.
Memory 52 may also include a program/utility 525 having a set (at least one) of program modules 524, such program modules 524 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
The processor 51 executes various functional applications and data processing, such as an upload preview method of the Sktech project file according to embodiment 1 or 2 of the present invention, by running a computer program stored in the memory 52.
The electronic device 50 may also communicate with one or more external devices 54 (e.g., a keyboard, a pointing device, etc.). Such communication may be through an input/output (I/O) interface 55. Also, the model-generating device 30 may also communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet) via the network adapter 56. As shown in FIG. 6, the network adapter 56 communicates with the other modules of the model-generated device 50 via the bus 53. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the model-generating device 50, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (disk array) systems, tape drives, and data backup storage systems, etc.
It should be noted that although in the above detailed description several units/modules or sub-units/modules of the electronic device are mentioned, such a division is merely exemplary and not mandatory. Indeed, the features and functionality of two or more of the units/modules described above may be embodied in one unit/module according to embodiments of the invention. Conversely, the features and functions of one unit/module described above may be further divided into embodiments by a plurality of units/modules.
Example 6
The present embodiment provides a computer-readable storage medium on which a computer program is stored, which when executed by a processor, implements the steps in the upload preview method of the Sktech project file of embodiment 1 or 2.
More specific examples, among others, that the readable storage medium may employ may include, but are not limited to: a portable disk, a hard disk, random access memory, read only memory, erasable programmable read only memory, optical storage device, magnetic storage device, or any suitable combination of the foregoing.
In a possible implementation manner, the present invention can also be implemented in the form of a program product, which includes program code for causing a terminal device to execute the steps in the upload preview method of the Sktech project file implementing embodiment 1 or 2 when the program product runs on the terminal device.
Where program code for carrying out the invention is written in any combination of one or more programming languages, the program code may be executed entirely on the user device, partly on the user device, as a stand-alone software package, partly on the user device and partly on a remote device or entirely on the remote device.
While specific embodiments of the invention have been described above, it will be appreciated by those skilled in the art that this is by way of example only, and that the scope of the invention is defined by the appended claims. Various changes and modifications to these embodiments may be made by those skilled in the art without departing from the spirit and scope of the invention, and these changes and modifications are within the scope of the invention.

Claims (10)

1. A Sketch project file uploading preview method is characterized by comprising the following steps:
uploading the Sketch project file to a storage system at a Sketch plug-in client;
the Sketch plug-in generates a version identification number of the Sketch project file, and the storage system returns a file identification number of the Sketch project file;
generating an online preview address of the Sketch project file according to the file identification number and the version identification number of the Sketch project file;
and accessing the online preview address in a browser to preview the Sketch project file.
2. The Sketch project file uploading preview method of claim 1, wherein the Sketch project file is exported, labeled, sliced, packed and compressed before being uploaded and stored in a storage system;
the Sketch project file comprises at least one of a Sketch file, a markup manuscript JSON file, a slice JSON file and a picture file generated by the Sketch file;
when the online preview address is accessed in a browser, at least one of the Sketch file, the annotation draft JSON file, the slice JSON file and a picture file generated by the Sketch file is obtained, and a preview page of the Sketch project file is loaded and generated;
and after the online preview address of the Sketch project file is generated, automatically opening a browser, jumping to the online preview address, and previewing the Sketch project file.
3. A Sketch project file upload preview method as claimed in claim 2 wherein said storage system includes a system database and a Ceph distributed storage system;
when the Sketch project file is uploaded and stored in a storage system, the Ceph distributed storage system stores the Sketch file according to a naming mode of sketch.uuid ═ A, stores the annotation manuscript JSON file according to a naming mode of A.pages.json, stores the slice JSON file according to a naming mode of A.pages.json, and stores the picture file according to a naming mode of A.P.png; wherein A represents the version identification number, P represents a picture document identifier, and the picture document identifier is obtained by analyzing the annotation draft JSON file and the slice JSON file;
and when the storage system returns the file identification number of the Sketch project file, the system database returns the file identification number of the Sketch project file.
4. The Sketch project file uploading preview method of claim 1, wherein before uploading and storing the Sketch project file in the storage system, the user authority of the client requesting to upload is verified;
and/or verifying the user authority of the client requesting the preview before accessing the online address in the browser.
5. A Sketch project file uploading preview system is characterized in that the Sketch project file uploading preview system comprises a file uploading module, an identification number generating module, an address generating module and a preview module;
the file uploading module is used for uploading the Sketch project file at the Sketch plug-in client and storing the Sketch project file in the storage system;
the identification number generating module is used for generating a version identification number of the Sketch item file in the Sketch plug-in, and the identification number generating module is also used for returning a file identification number of the Sketch item file from the storage system;
the address generating module is used for generating an online preview address of the Sketch project file according to the file identification number and the version identification number of the Sketch project file;
and the preview module is used for accessing the online preview address in a browser and previewing the Sketch project file.
6. A Sketch project file upload preview system as claimed in claim 5 wherein said Sketch project file upload preview system further includes a pre-processing module;
before uploading and storing the Sketch project file into a storage system, the preprocessing module is used for exporting, labeling, slicing, packaging and compressing the Sketch project file;
the Sketch project file comprises at least one of a Sketch file, a markup manuscript JSON file, a slice JSON file and a picture file generated by the Sketch file;
when the online address is accessed in a browser, the preview module further acquires at least one of a Sketch file, a markup draft JSON file, a slice JSON file and a picture file generated by the Sketch file, and loads and generates a preview page of the Sketch project file; after the online preview address of the Sketch project file is generated, the preview module is further used for automatically opening a browser, jumping to the online preview address, and previewing the Sketch project file.
7. A Sketch project file upload preview system of claim 6 wherein said storage system includes a system database and a Ceph distributed storage system;
the system for uploading and previewing the Sketch project file further comprises a storage module; when the Sketch project file is uploaded and stored in the Ceph storage system, the storage module stores the Sketch file according to a naming mode of sketch.uuid ═ A, the storage module stores the annotation manuscript JSON file according to a naming mode of A.pages.json, the storage module stores the slice JSON file according to a naming mode of A.pages.json, and the storage module stores the picture file according to a naming mode of A.P.png; wherein A represents the version identification number, P represents a picture document identifier, and the picture document identifier is obtained by analyzing the annotation draft JSON file and the slice JSON file;
and when the storage system returns the file identification number of the Sketch project file, the identification number generation module returns the file identification number of the Sketch project file from the system database.
8. A Sketch project file upload preview system according to claim 5 wherein said Sketch project file upload preview system further includes a rights validation module; before uploading and storing the Sketch project file into a storage system, the authority verification module verifies the user authority of the client requesting to upload;
and/or before the online address is accessed in the browser, the authority verification module verifies the user authority of the client requesting the preview.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method for uploading preview of a Sketch project file according to any one of claims 1 to 4 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method for uploading a preview of a Sketch project file according to any of claims 1 to 4.
CN202010499263.7A 2020-06-04 2020-06-04 Sketch project file uploading preview method, system, equipment and medium Active CN111651416B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010499263.7A CN111651416B (en) 2020-06-04 2020-06-04 Sketch project file uploading preview method, system, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010499263.7A CN111651416B (en) 2020-06-04 2020-06-04 Sketch project file uploading preview method, system, equipment and medium

Publications (2)

Publication Number Publication Date
CN111651416A true CN111651416A (en) 2020-09-11
CN111651416B CN111651416B (en) 2023-06-13

Family

ID=72351192

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010499263.7A Active CN111651416B (en) 2020-06-04 2020-06-04 Sketch project file uploading preview method, system, equipment and medium

Country Status (1)

Country Link
CN (1) CN111651416B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114968957A (en) * 2022-04-19 2022-08-30 高途教育科技集团有限公司 File sharing method and device, storage medium and electronic equipment

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080307000A1 (en) * 2007-06-08 2008-12-11 Toby Charles Wood Paterson Electronic Backup of Applications
WO2012093856A2 (en) * 2011-01-04 2012-07-12 Samsung Electronics Co., Ltd. Method and apparatus for creating a live artistic sketch of an image
CN106373036A (en) * 2016-09-21 2017-02-01 广东中建普联科技股份有限公司 Construction project data automatic recognition and analysis method and system
CN107465938A (en) * 2016-06-06 2017-12-12 北京优朋普乐科技有限公司 The method, apparatus and media server system of a kind of media preview
CN107896244A (en) * 2017-11-07 2018-04-10 中国银联股份有限公司 A kind of distribution method of version file, client and server
CN108574686A (en) * 2017-05-17 2018-09-25 北京金山云网络技术有限公司 A kind of method and device of online preview file
CN108804503A (en) * 2018-04-12 2018-11-13 北京明朝万达科技股份有限公司 A kind of online method for previewing of document and system
CN109819033A (en) * 2019-01-25 2019-05-28 杭州迪普科技股份有限公司 A kind of resource file loading method and system
US20190179876A1 (en) * 2017-12-12 2019-06-13 Google Llc Managing comments on binary files preview view in a cloud-based environment
CN110955540A (en) * 2019-11-28 2020-04-03 上海携程商务有限公司 Plug-in interaction method

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080307000A1 (en) * 2007-06-08 2008-12-11 Toby Charles Wood Paterson Electronic Backup of Applications
WO2012093856A2 (en) * 2011-01-04 2012-07-12 Samsung Electronics Co., Ltd. Method and apparatus for creating a live artistic sketch of an image
CN107465938A (en) * 2016-06-06 2017-12-12 北京优朋普乐科技有限公司 The method, apparatus and media server system of a kind of media preview
CN106373036A (en) * 2016-09-21 2017-02-01 广东中建普联科技股份有限公司 Construction project data automatic recognition and analysis method and system
CN108574686A (en) * 2017-05-17 2018-09-25 北京金山云网络技术有限公司 A kind of method and device of online preview file
CN107896244A (en) * 2017-11-07 2018-04-10 中国银联股份有限公司 A kind of distribution method of version file, client and server
US20190179876A1 (en) * 2017-12-12 2019-06-13 Google Llc Managing comments on binary files preview view in a cloud-based environment
CN108804503A (en) * 2018-04-12 2018-11-13 北京明朝万达科技股份有限公司 A kind of online method for previewing of document and system
CN109819033A (en) * 2019-01-25 2019-05-28 杭州迪普科技股份有限公司 A kind of resource file loading method and system
CN110955540A (en) * 2019-11-28 2020-04-03 上海携程商务有限公司 Plug-in interaction method

Non-Patent Citations (6)

* Cited by examiner, † Cited by third party
Title
AMAL DEV PARAKKAT 等: "Sketch and shade: an interactive assistant for sketching and shading", pages 1 - 2 *
YOUNG-WOOK JUNG 等: "Possibilities and Limitations of Online Document Tools for Design Collaboration: The Case of Google Docs", ACM, pages 1096 *
产品之道: "通过链接在线预览Sketch设计图", pages 1 - 2 *
刘鹏坤;樊大为;朱甲领;: "基于SketchUp和ArcGIS的三维数字校园", no. 02, pages 185 - 186 *
李娜;何贞铭;陈诗佳;马海兵;: "基于GIS与SketchUp的三维校园建模分析与实现", 测绘与空间地理信息, no. 11, pages 87 - 89 *
杨黎;王枫;: "EAST文档自动化的研究与实现", 计算机应用与软件, no. 01, pages 53 - 56 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114968957A (en) * 2022-04-19 2022-08-30 高途教育科技集团有限公司 File sharing method and device, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN111651416B (en) 2023-06-13

Similar Documents

Publication Publication Date Title
US10708252B2 (en) Configuring credentials to faciltate sharing data in a secure manner
US7783624B2 (en) E-commerce system using searchable tags
JP2019012529A (en) Document management and collaboration system
CN109347855B (en) Data access method, device, system, electronic design and computer readable medium
US9864671B1 (en) Systems and methods of live experimentation on content provided by a web site
CN102473171A (en) Communicating information about a local machine to a browser application
US20130318089A1 (en) Catalog performance and integrity analysis
CA3040568A1 (en) System and method for generating websites from predefined templates
CN110858839A (en) OAUTH2SAML token service
JP4282312B2 (en) Web server, Web server having Java servlet function, and computer program
CN106233257A (en) The conditionality of input data preserves
US11030345B2 (en) Sharing regulated content stored on non-regulated storage platforms
US11526367B1 (en) Systems and methods for translation of a digital document to an equivalent interactive user interface
WO2011075612A1 (en) Methods and apparatuses for abstract representation of financial documents
CN111651416B (en) Sketch project file uploading preview method, system, equipment and medium
US8302162B1 (en) Backup and archival of hosted online content
US8676849B2 (en) Storing lossless transforms of data
KR102087268B1 (en) Apparatus for providing web control interface and operating method thereof
US20150356277A1 (en) Method for automating the management and interpretation of digital documents and their owners rights metadata for generating digital rights management protected contents
US20210342130A1 (en) Systems and methods for software application generation and delivery
CN104361094A (en) Storage method and device for file in search result, and browser client
US10585992B2 (en) Changing a language for a user session replay
US20170244649A1 (en) Method of and a system for providing access to a file to a web resource
CN111988405A (en) Message rewriting method of load balancing device and load balancing device
Rachovski et al. Conceptual model of an application for automated generation of webpage mobile versions

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant