Method, device and readable storage medium for identifying downloaded file type
A file type and file technology, applied in the fields of instruments, computing, electrical digital data processing, etc., can solve the problems of waste of network traffic for downloading file types, and the terminal browser cannot recognize it, so as to avoid user traffic consumption and improve user experience. Effect
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0071] Such as image 3 As shown, the embodiment of the present invention provides a method for identifying the type of downloaded file, the method includes the following steps:
[0072] S101. Parse the resource information of the downloaded resource, and acquire the file type corresponding to the downloaded resource, including the file name and file extension;
[0073] When the user clicks a download resource on the webpage through the browser interface, the browser webpage parses the resource information related to the download resource, which includes the URL of the download resource, the URL of the webpage providing the download resource, and the cookies of this website, resource bytes Size, resource content type Content-Type, etc. Some resources also include the default file name required by the website for file saving, that is, the Content-Disposition field. This resource is the most ideal situation. There are many resources that only have URLs for downloading resources...
Embodiment 2
[0098] Such as Figure 5 As shown, the embodiment of the present invention provides a hardware structure of an apparatus for identifying a downloaded file type. Specifically, the apparatus 30 for identifying a downloaded file type includes at least a processor 31 , a memory 32 and a data bus 33 . The data bus 33 is used to realize the connection and communication between the processor 31 and the memory 32. The memory 32, as a computer-readable storage medium, can store at least one computer program, and these computer programs can be read, compiled and executed by the processor 31 , so as to realize the corresponding processing flow. In this embodiment, the memory 32 is used as a computer-readable storage medium, in which a program for identifying the type of the downloaded file is stored, and the program can be executed by the processor 31, thereby realizing the steps of the method for identifying the type of the downloaded file as follows:
[0099] Analyzing the resource in...
Embodiment 3
[0114] Based on the same inventive concept, another aspect of the present invention provides a computer-readable storage medium, the computer-readable storage medium stores a program for identifying the type of downloaded file, and when the program for identifying the type of downloaded file is executed by a processor The following steps are implemented to identify the method of downloading the file type:
[0115] Analyzing the resource information of the downloaded resource, and obtaining the file type corresponding to the downloaded resource, including the file name and file extension;
[0116] judging whether the downloaded resource matches the actual resource according to the file extension;
[0117] When the downloaded resource matches the actual resource, prompt to start acquiring the downloaded resource and the file name corresponding to the downloaded resource.
[0118] Wherein, the step of analyzing the resource information of the downloaded resource and obtaining th...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


