Method and device for supporting uploading of multiple pictures on browser, equipment and medium
By using the image selection function and data acquisition function of the web development toolkit on Android devices, a binary large object file is generated, which solves the problem that the Android device browser does not support multiple pictures uploads, and a simplified multi-picture upload process is achieved.
Patent Information
- Application Number
- CN202411302041.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-18
- Publication Date
- 2025-01-10
AI Technical Summary
The browser of Android system does not always support the multiple attribute of HTML5, which causes users to need to repeat operations when uploading multiple images on Android devices, making it difficult to upload one time.
By calling the image selection function of the web development toolkit on the target application side, obtaining the image path address, generating an image list, and converting it into a binary large object file to send it to the server, the browser uploads the selected image.
It realizes uploading multiple pictures at one time on Android devices, simplifies user operation process and avoids repeated operations.
Smart Images

Figure CN119293364A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of terminal technology and related technical fields, and in particular to a method, apparatus, device and medium, apparatus, device and medium applicable to supporting uploading multiple pictures in a browser. Background Art
[0002] Currently, many applications (applications, APPs) can upload multiple pictures, and realize functions such as face recognition and picture saving by uploading multiple pictures.
[0003] In the prior art, mobile device users usually upload images to a server through a browser. Although HTML5 introduces the multiple attribute, which allows multiple files to be selected from a device at one time, the browser of the Android system does not always support this feature.
[0004] Therefore, on Android devices, users may need to repeat the operation multiple times to upload multiple pictures. Summary of the invention
[0005] The embodiments described in this article provide a method, apparatus, device and medium for supporting an Android device to upload multiple images in a browser, solving the problems existing in the prior art.
[0006] In a first aspect, according to the content of the present disclosure, a method for supporting an Android device to upload multiple images in a browser is provided, which is applied to a target application end and includes:
[0007] In response to the received target link of the target browser triggered by the target object, calling the image selection function of the webpage development toolkit of the target application end, so that the target object selects the uploaded target image;
[0008] After receiving the target object selection picture completion indication information, obtaining the path address of each of the target pictures on the target application end;
[0009] Generate a picture list according to the path address of each target picture at the target application end, wherein the path address of each target picture at the target application end in the picture list is stored in a target format;
[0010] The image list is converted into a binary large object file and sent to the server of the target browser, so that when the target browser responds to the upload image operation triggered by the target object, the target browser can upload the selected target image by calling the binary large object file from the server.
[0011] In some embodiments of the present disclosure, generating a picture list according to the path address of each target picture on the target application terminal includes:
[0012] According to the path address of each target image on the target application end, a data acquisition function of the webpage development toolkit of the target application end is called recursively to obtain data information of the target format of each target image;
[0013] Generate a picture list according to the data information of the target format of each of the target pictures.
[0014] In some embodiments of the present disclosure, converting the picture list into a binary large object file and sending the file to a server of a target browser includes:
[0015] Obtaining a data URL from the data information corresponding to the target image, wherein the data URL includes a type tag identifier and a data string;
[0016] Decoding the data string to obtain a binary data stream;
[0017] A binary large object file is generated according to the type tag identifier and the binary data stream.
[0018] In some embodiments of the present disclosure, generating a binary large object file according to the type tag identifier and the binary data stream includes:
[0019] Create an initial byte array;
[0020] Filling the binary data stream generated by decoding into the initial byte array to obtain an unsigned target byte array;
[0021] A binary large object file is generated according to the unsigned target byte array and the type tag identifier.
[0022] In a second aspect, according to the content of the present disclosure, a method for supporting an Android device to upload multiple images in a browser is provided, which is applied to a target browser and includes:
[0023] In response to receiving a select picture operation triggered by a target object, sending a target link corresponding to the select picture operation to the target application end;
[0024] The target browser jumps to the picture upload page, responds to the picture upload operation triggered by the target object, calls the binary large object file from the server, and uploads the selected target picture to the target browser.
[0025] In some embodiments of the present disclosure, in response to receiving a select picture operation triggered by a target object, before sending a target link corresponding to the select picture operation to the target application end, the method further includes:
[0026] Get device type information, browser environment information, image selection mode, and SDK configuration status;
[0027] When the device type information, the browser environment information, the image selection mode and the SDK configuration status meet preset conditions, in response to receiving a picture selection operation triggered by a target object, a target link corresponding to the picture selection operation is sent to the target application end.
[0028] In a third aspect, according to the content of the present disclosure, a device for supporting an Android device to upload multiple pictures in a browser is provided, comprising:
[0029] A function calling module, configured to call an image selection function of a webpage development toolkit of the target application end in response to a target link of a target browser triggered by a received target object, so that the target object selects a target image to be uploaded;
[0030] A path address acquisition module, used to acquire the path address of each target image on the target application end after receiving the target object selection image completion indication information;
[0031] A picture list generating module, configured to generate a picture list according to the path address of each target picture at the target application end, wherein the path address of each target picture at the target application end in the picture list is stored in a target format;
[0032] The sending module is used to convert the image list into a binary large object file and send it to the server of the target browser, so that when the target browser responds to the upload image operation triggered by the target object, the target browser can upload the selected target image by calling the binary large object file from the server.
[0033] In a fourth aspect, according to the content of the present disclosure, there is provided a device for supporting an Android device to upload multiple pictures in a browser, comprising:
[0034] A response module, configured to, in response to receiving a select picture operation triggered by a target object, send a target link corresponding to the select picture operation to the target application end;
[0035] The calling module is used to jump to the picture upload page in the target browser, respond to the picture upload operation triggered by the target object, call the binary large object file from the server, and upload the selected target picture in the target browser.
[0036] In a fifth aspect, according to the content of the present disclosure, a computer device is provided, including:
[0037] one or more processors;
[0038] a storage device for storing one or more programs,
[0039] When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of the first aspect or the second aspect.
[0040] In a sixth aspect, according to the contents of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the method described in any one of the first aspect or the second aspect is implemented.
[0041] The method, device, equipment and medium for supporting Android devices to upload multiple pictures in a browser provided by the embodiment of the present disclosure first respond to the target link of the target browser triggered by the received target object, call the picture selection function of the webpage development toolkit of the target application end, so that the target object selects the target picture to be uploaded; and after receiving the target object to select the picture completion indication information, obtain the path address of each target picture in the target application end; and generate a picture list according to the path address of each target picture in the target application end; finally, convert the picture list into a binary large object file and send it to the server of the target browser, so that the target browser can upload the selected target picture in the target browser by calling the binary large object file from the server when responding to the upload picture operation triggered by the target object. By calling the picture selection function of the target application end, multiple target pictures to be uploaded are selected, and the picture data of the selected target pictures to be uploaded are converted into a binary large object file and sent to the target browser, so that the target browser can upload multiple pictures by calling the binary large object file generated by the target application end.
[0042] The above description is only an overview of the technical solution of the embodiment of the present application. In order to more clearly understand the technical means of the embodiment of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the embodiment of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings of the embodiments will be briefly described below. It should be noted that the drawings described below only relate to some embodiments of the present disclosure, but are not intended to limit the present disclosure, wherein:
[0044] Figure 1 It is a flowchart of a flowchart of a method for supporting an Android device to upload multiple pictures in a browser provided by an embodiment of the present disclosure;
[0045] Figure 2is a schematic diagram of an interactive structure between a target browser and a target application terminal provided by an embodiment of the present disclosure;
[0046] Figure 3 It is a flowchart of another method for supporting an Android device to upload multiple pictures in a browser provided by an embodiment of the present disclosure;
[0047] Figure 4 It is a structural schematic diagram of a device for supporting an Android device to upload multiple pictures in a browser provided by an embodiment of the present disclosure;
[0048] Figure 5 It is a structural schematic diagram of another device for supporting an Android device to upload multiple pictures in a browser provided by an embodiment of the present disclosure;
[0049] Figure 6 It is a structural diagram of a computer device provided in an embodiment of the present disclosure.
[0050] In the drawings, reference numerals with the same last two digits correspond to the same elements. It should be noted that the elements in the drawings are schematic and not drawn to scale. DETAILED DESCRIPTION
[0051] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution of the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present disclosure, rather than all of the embodiments. Based on the described embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without creative work also fall within the scope of protection of the present disclosure.
[0052] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by a person skilled in the art to which the subject matter of the present disclosure belongs. It will be further understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the specification and the relevant art, and will not be interpreted in an idealized or overly formal form unless otherwise explicitly defined herein. As used herein, a statement that two or more parts are "connected" or "coupled" together shall mean that the parts are joined together directly or through one or more intermediate components.
[0053] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase "embodiments" in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0054] The term "and / or" in this article is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists, A and B exist at the same time, and B exists. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0055] Furthermore, in all embodiments of the present disclosure, terms such as “first” and “second” are used only to distinguish one component (or a part of a component) from another component (or another part of a component).
[0056] In the description of the present application, unless otherwise specified, "plurality" means more than two (including two), and similarly, "multiple groups" means more than two groups (including two).
[0057] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.
[0058] Based on the problems existing in the prior art, the present disclosure provides a method for supporting an Android device to upload multiple pictures in a browser. Figure 1 is a flow chart of a method for supporting an Android device to upload multiple pictures in a browser provided by an embodiment of the present disclosure, the method is applied to a target application end, Figure 2 is a schematic diagram of the interaction between the target application end and the target browser that supports Android devices to upload multiple pictures in the browser provided by the embodiment of the present disclosure, combined with Figure 1 and Figure 2 , methods that support uploading multiple images in the browser on Android devices include:
[0059] S110 . In response to the received target link of the target browser triggered by the target object, call the image selection function of the webpage development toolkit of the target application end to enable the target object to select the uploaded target image.
[0060] The method for supporting an Android device to upload multiple images in a browser provided by the embodiment of the present disclosure is implemented based on a target application end and a browser of an Android device, wherein the target application end supports uploading multiple images at one time, and the target client embodiment of the present disclosure does not specifically limit this.
[0061] In a specific implementation, when the target object triggers a picture selection operation in the target browser, the target browser will generate a target link corresponding to the picture selection operation and send the target link to the target application end. The target object can open the target link based on the web page in the target application end. In the process of the target object opening the target link in the target application end, the target application end will call the picture selection function chooseImage of the web development toolkit, and let the target object select multiple pictures to be uploaded through the picture selection function.
[0062] Specifically, the image selection function chooseImage in the network development toolkit JS-SDK on the target application side is called to select an image. The image selection function chooseImage has 4 parameters. The parameter count indicates the maximum number of images that can be selected, the parameter sizeType indicates the supported image mode, such as original images and / or compressed images, the parameter sourceType indicates the path through which the image is selected, such as an album, folder, etc., and the parameter success indicates the path address of the target image selected by the target object after selecting the image on the target application side, that is, localIds.
[0063] S120 . After receiving the target object image selection completion indication information, obtain the path address of each target image on the target application end.
[0064] When the target object selects the target image on the target application side, the target application side will obtain the path address of each target image on the target application side, that is, when each target image needs to be displayed on the target application side, the path address from which each target image needs to be obtained.
[0065] S130 . Generate a picture list according to the path address of each target picture on the target application end.
[0066] Among them, the path address of each target image in the image list at the target application end is stored in a target format.
[0067] In a specific implementation, a picture list is generated according to the path address of each target picture at the target application end, including: according to the path address of each target picture at the target application end, a data acquisition function of a web development toolkit at the target application end is recursively called to obtain data information of a target format of each target picture; and a picture list is generated according to the data information of the target format of each target picture.
[0068] Specifically, in the network development toolkit JS-SDK on the target application side, its methods are usually not called directly recursively, because most of the methods provided by the network development toolkit JS-SDK on the target application side are to achieve specific functions, such as sharing, obtaining user information, payment, etc., which are not suitable for implementation through recursion. Recursion is usually used to solve problems that can be decomposed into similar sub-problems, such as traversing a tree structure, calculating factorials, etc. However, if it is really necessary to process the logic related to the network development toolkit JS-SDK on the target application side in a recursive manner in a certain scenario, for example, this application is based on the data acquisition function getLocalImgData in the network development toolkit JS-SDK on the target application side, to obtain the data information of the target format of each target image, and then upload multiple images at one time in the target browser.
[0069] Specifically, first, based on the target data acquisition function getLocalImgData in the network development toolkit JS-SDK on the target application side, the data information of each target image is obtained recursively, and then a picture list is generated according to the data information of each target image. That is, if the target object selects 9 pictures as target pictures at a time on the target application side, then one target picture corresponds to one data information, and the format of the data information of each picture is base64 encoded. The data information corresponding to each target picture includes at least the path address of the target picture on the target application side, that is, the path address of the target picture on the target application side is in base64 encoding format.
[0070] After obtaining the data information of each target image, the data information of all target images are combined to generate a picture list.
[0071] S140, converting the image list into a binary large object file and sending it to the server of the target browser, so that when the target browser responds to the upload image operation triggered by the target object, the target browser uploads the selected target image by calling the binary large object file from the server.
[0072] In a specific implementation, converting a picture list into a binary large object file and sending it to a server of a target browser includes: obtaining a data URL from data information corresponding to the target picture, wherein the data URL includes a type tag identifier and a data string; decoding the data string to obtain a binary data stream; and generating a binary large object file based on the type tag identifier and the binary data stream.
[0073] The method of generating a binary large object file according to a type tag identifier and a binary data stream includes: creating an initial byte array; filling the decoded binary data stream into the initial byte array to obtain an unsigned target byte array; and generating a binary large object file according to the unsigned target byte array and the type tag identifier.
[0074] Specifically, firstly, the data information corresponding to each target image is obtained from the image list, and then the data URL is obtained from the data information corresponding to each target image. The data URL is separated to obtain the data string included in the data URL, wherein the data string included in the data URL is displayed in an encoded form, and then the data string included in the data URL is decoded to obtain the binary data stream corresponding to each target image, and then the type tag identifier and the binary data stream corresponding to each target image are combined to obtain a binary large object file corresponding to a target image.
[0075] Specifically, an unsigned byte array (Uint8Array) is created, and the binary data stream corresponding to each decoded target image is filled into the array. Based on the unsigned byte array and the type tag identifier corresponding to each extracted target image, a binary large object file is created.
[0076] It should be noted that, in a specific implementation, if the type tag of the target image is identified as the "image / jpg" type, it will be corrected to the standard "image / jpeg" type.
[0077] After the binary large object file is generated, a name is assigned to the generated binary large object file, which name may be generated based on the current date and time, ".jpeg" is used as the file extension, and the last modification date of the binary large object file is set to the current date and time, and finally the binary large object file is returned to the server of the target browser.
[0078] The disclosed embodiment provides a method for supporting an Android device to upload multiple pictures in a browser. First, in response to a target link of a target browser triggered by a received target object, a picture selection function of a webpage development toolkit of a target application end is called to enable the target object to select a target picture to be uploaded; and after receiving the target object to select the picture completion indication information, the path address of each target picture on the target application end is obtained; and a picture list is generated according to the path address of each target picture on the target application end; finally, the picture list is converted into a binary large object file and sent to the server of the target browser, so that the target browser, when responding to the upload picture operation triggered by the target object, can upload the selected target picture on the target browser by calling the binary large object file from the server. By calling the picture selection function of the target application end on the target application end, multiple target pictures to be uploaded are selected, and the picture data of the selected target pictures to be uploaded are converted into a binary large object file and sent to the target browser, so that the target browser can upload multiple pictures by calling the binary large object file generated by the target application end.
[0079] Based on the above embodiments, Figure 3 is a flowchart of another method for supporting an Android device to upload multiple pictures in a browser provided by an embodiment of the present disclosure. The method is applied to a target browser and combined with Figure 2 and Figure 3 , methods that support uploading multiple images in the browser on Android devices include:
[0080] S210 . In response to receiving a picture selection operation triggered by a target object, sending a target link corresponding to the picture selection operation to a target application end.
[0081] In a specific implementation, first, the target object triggers a picture selection operation in the target browser. After the target object triggers the picture selection operation in the target browser, the target browser sends a link corresponding to the picture selection operation to the target application end, for example, by using a user-friendly sharing method to send the link to the target application end. After receiving the target link, the target application end can trigger the target link in the target application end. At this time, the target application end will call the picture selection function of the web development toolkit to select multiple pictures at a time, and after the target object has selected multiple pictures, a picture list is generated according to the path address of each target picture in the target application end, and the picture list is converted into a binary large object file and sent to the server of the target browser.
[0082] S220, jumping to the picture upload page in the target browser, responding to the picture upload operation triggered by the target object, calling the binary large object file from the server, and uploading the selected target picture in the target browser.
[0083] At this point, the target browser will jump to the image upload page and call the binary large object file to upload the selected target image in the target browser.
[0084] In the method for supporting an Android device to upload multiple pictures in a browser provided by an embodiment of the present disclosure, on the one hand, in response to receiving a select picture operation triggered by a target object, a target browser sends a target link corresponding to the select picture operation to a target application end; on the other hand, the target browser jumps to an upload picture page, responds to the upload picture operation triggered by the target object, calls a binary large object file, and uploads the selected target picture in the target browser. Since the target picture to be uploaded selected by the target object in the target application end is stored in a server as a binary large object file, when uploading the picture, the called binary large object file includes the multiple pictures selected by the target object in the target application end, and therefore, it is possible to upload multiple pictures in the target browser.
[0085] In addition, based on the above embodiment, before executing step S210, it also includes: obtaining device type information, browser environment information, image selection mode and SDK configuration status; when the device type information, browser environment information, image selection mode and SDK configuration status meet preset conditions, in response to receiving a picture selection operation triggered by a target object, the target link corresponding to the picture selection operation is sent to the target application end.
[0086] Among them, the device type information refers to whether the navigator.userAgent attribute in the target browser contains the Android or Adr keyword, the browser environment information refers to whether the target browser is an Android browser, the image selection mode refers to the input parameter multiple in checkUseWXToUpload in the target application, and the SDK configuration status refers to the function of the web development toolkit JS-SDK in the target application.
[0087] Specifically, by obtaining whether the navigator.userAgent property in the target browser contains the Android or Adr keyword, it is determined whether the target browser is an Android browser. If the navigator.userAgent property in the target browser contains the Android or Adr keyword, the target browser is an Android browser. By obtaining whether the navigator.userAgent property in the target browser contains the MicroMessenger keyword, it is determined whether the target browser has a communication relationship with the target application. If the navigator.userAgent property in the target browser contains the MicroMessenger keyword, the target browser has a communication relationship with the target application. Obtain the transmission value in checkUseWXToUpload in the target application. Whether the input parameter multiple is true. If the input parameter multiple in checkUseWXToUpload in the target application is true, it indicates that the target application supports uploading multiple pictures. Whether the function of the web development toolkit JS-SDK in the target application is normal. If no error is captured in the web development toolkit JS-SDK in the target application, it indicates that the function of the web development toolkit JS-SDK in the target application is normal. The method for supporting an Android device to upload multiple pictures in a browser provided by the embodiment of the present disclosure can be executed only when the device type information, browser environment information, picture selection mode and SDK configuration status all meet the conditions. If one of the conditions in the device type information, browser environment information, picture selection mode and SDK configuration status is not met, the method for supporting an Android device to upload multiple pictures in a browser provided by the embodiment of the present disclosure cannot be executed.
[0088] Based on the above embodiments, the disclosed embodiments further provide a device that supports Android devices to upload multiple pictures in a browser. Figure 4 is a schematic diagram of a structure of a device for supporting an Android device to upload multiple pictures in a browser, provided by an embodiment of the present disclosure. Figure 4 As shown, a device that supports an Android device to upload multiple pictures in a browser includes:
[0089] The function calling module 410 is used to call the image selection function of the webpage development toolkit of the target application end in response to the target link of the target browser triggered by the received target object, so that the target object selects the uploaded target image;
[0090] The path address acquisition module 420 is used to acquire the path address of each target image on the target application end after receiving the target object selection image completion indication information;
[0091] A picture list generating module 430, configured to generate a picture list according to the path address of each target picture at the target application end, wherein the path address of each target picture in the picture list at the target application end is stored in a target format;
[0092] The sending module 440 is used to convert the image list into a binary large object file and send it to the server of the target browser, so that when the target browser responds to the upload image operation triggered by the target object, the target browser can upload the selected target image in the target browser by calling the binary large object file from the server.
[0093] The disclosed embodiment provides a device that supports Android devices to upload multiple pictures in a browser. First, in response to a target link of a target browser triggered by a received target object, a picture selection function of a webpage development toolkit of a target application end is called to enable the target object to select a target picture to be uploaded; and after receiving the target object to select the picture completion indication information, the path address of each target picture on the target application end is obtained; and a picture list is generated according to the path address of each target picture on the target application end; finally, the picture list is converted into a binary large object file and sent to the server of the target browser, so that the target browser, when responding to the upload picture operation triggered by the target object, can upload the selected target picture on the target browser by calling the binary large object file from the server. By calling the picture selection function of the target application end, multiple target pictures to be uploaded are selected, and the picture data of the selected target pictures to be uploaded are converted into a binary large object file and sent to the target browser, so that the target browser can upload multiple pictures by calling the binary large object file generated by the target application end.
[0094] In a specific implementation, a picture list is generated according to the path address of each target picture on the target application end, including:
[0095] According to the path address of each target image on the target application side, a data acquisition function of the webpage development toolkit on the target application side is called recursively to obtain data information of the target format of each target image;
[0096] Generate a picture list based on the data information of the target format of each target picture.
[0097] In a specific implementation, converting the image list into a binary large object file and sending it to a server of a target browser includes:
[0098] Obtain the data URL from the data information corresponding to the target image, where the data URL includes a type tag identifier and a data string;
[0099] Decode the data string to obtain a binary data stream;
[0100] Generate a binary large object file based on the type tag identifier and the binary data stream.
[0101] In a specific implementation, generating a binary large object file according to the type tag identifier and the binary data stream includes:
[0102] Create an initial byte array;
[0103] Fill the binary data stream generated by decoding into the initial byte array to obtain an unsigned target byte array;
[0104] Generates a binary large object file from an unsigned target byte array and a type tag identifier.
[0105] Based on the above embodiments, the disclosed embodiments also provide another device that supports Android devices to upload multiple pictures in a browser. Figure 5 is a schematic diagram of a structure of a device for supporting an Android device to upload multiple pictures in a browser, provided by an embodiment of the present disclosure. Figure 5 As shown, a device that supports an Android device to upload multiple pictures in a browser includes:
[0106] A response module 510 is used for sending a target link corresponding to the picture selection operation to the target application end in response to receiving the picture selection operation triggered by the target object;
[0107] The calling module 520 is used to jump to the upload picture page in the target browser, respond to the upload picture operation triggered by the target object, call the binary large object file from the server, and upload the selected target picture in the target browser.
[0108] In the device for supporting Android devices to upload multiple pictures in a browser provided by the embodiment of the present disclosure, the target browser, on the one hand, responds to receiving the picture selection operation triggered by the target object, and sends the target link corresponding to the picture selection operation to the target application end; on the other hand, the target browser jumps to the picture upload page, responds to the picture upload operation triggered by the target object, calls the binary large object file, and realizes uploading the selected target picture in the target browser. Since the target picture to be uploaded selected by the target object in the target application end is stored in the server as a binary large object file, when uploading the picture, the called binary large object file includes the multiple pictures selected by the target object in the target application end, and therefore, it is possible to realize uploading of multiple pictures in the target browser.
[0109] In a specific implementation, in response to receiving a select picture operation triggered by a target object, before sending a target link corresponding to the select picture operation to a target application end, the method further includes:
[0110] Get device type information, browser environment information, image selection mode, and SDK configuration status;
[0111] When the device type information, browser environment information, image selection mode and SDK configuration status meet the preset conditions, in response to receiving the image selection operation triggered by the target object, the target link corresponding to the image selection operation is sent to the target application end.
[0112] The present application also provides a computer device. Figure 6 , Figure 6 This is a basic structural block diagram of the computer device in this embodiment.
[0113] The computer device includes a memory 610 and a processor 620 that are connected to each other through a system bus. It should be noted that the figure only shows a computer device with components 610-620, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field-programmable gate arrays (Field-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, etc.
[0114] Computer devices can be computing devices such as desktop computers, notebooks, PDAs, and cloud servers. Computer devices can interact with users through keyboards, mice, remote controls, touch pads, or voice control devices.
[0115] The memory 610 includes at least one type of readable storage medium, and the readable storage medium includes a non-volatile memory or a volatile memory, such as a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc., and the RAM may include a static RAM or a dynamic RAM. In some embodiments, the memory 610 may be an internal storage unit of a computer device, such as a hard disk or a memory of the computer device. In other embodiments, the memory 610 may also be an external storage device of a computer device, such as a plug-in hard disk, a smart memory card (SMC), a secure digital (SD) card, or a flash card (Flash Card), etc., equipped on the computer device. Of course, the memory 610 may also include both an internal storage unit of the computer device and an external storage device thereof. In this embodiment, the memory 610 is generally used to store an operating system and various application software installed on the computer device, such as the program code of the above method, etc. In addition, the memory 610 may also be used to temporarily store various data that have been output or are to be output.
[0116] The processor 620 is generally used to perform the overall operation of the computer device. In this embodiment, the memory 610 is used to store program codes or instructions, the program code includes computer operation instructions, and the processor 620 is used to execute the program codes or instructions stored in the memory 610 or process data, such as running the program code of the above method.
[0117] In this article, the bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus system can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0118] Another embodiment of the present application also provides a computer-readable medium, which may be a computer-readable signal medium or a computer-readable medium. A processor in a computer reads a computer-readable program code stored in the computer-readable medium, so that the processor can execute the functional actions specified in each step or a combination of steps in the above method; and generate a device for implementing the functional actions specified in each block or a combination of blocks in the block diagram.
[0119] Computer-readable media include but are not limited to electronic, magnetic, optical, electromagnetic, infrared memory or semiconductor systems, devices or apparatuses, or any appropriate combination of the foregoing, the memory is used to store program codes or instructions, the program codes include computer operating instructions, and the processor is used to execute the program codes or instructions of the above methods stored in the memory.
[0120] For the definitions of memory and processor, please refer to the description of the aforementioned computer device embodiment and will not be repeated here.
[0121] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0122] Each functional unit or module in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0123] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to perform all or part of the steps of each embodiment method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program code.
[0124] Unless the context clearly indicates otherwise, the singular form of the words used herein and in the appended claims includes the plural and vice versa. Thus, when referring to the singular, the plural form of the corresponding term is generally included. Similarly, the words "comprise" and "include" are to be interpreted as inclusive rather than exclusive. Likewise, the terms "include" and "or" should be interpreted as inclusive unless such interpretation is expressly prohibited herein. Where the term "example" is used herein, particularly when it is located after a group of terms, the "example" is merely exemplary and illustrative and should not be considered exclusive or comprehensive.
[0125] Further aspects and scopes of adaptability become apparent from the description provided herein. It should be understood that various aspects of the present application can be implemented individually or in combination with one or more other aspects. It should also be understood that the description and specific embodiments herein are intended for purposes of illustration only and are not intended to limit the scope of the present application.
[0126] Several embodiments of the present disclosure are described in detail above, but it is obvious that those skilled in the art can make various modifications and variations to the embodiments of the present disclosure without departing from the spirit and scope of the present disclosure. The protection scope of the present disclosure is defined by the attached claims.
Claims
1. A method for supporting an Android device to upload multiple pictures in a browser, applied to a target application end, characterized in that: include: In response to the received target link of the target browser triggered by the target object, calling the image selection function of the webpage development toolkit of the target application end, so that the target object selects the uploaded target image; After receiving the target object selection picture completion indication information, obtaining the path address of each of the target pictures on the target application end; Generate a picture list according to the path address of each target picture at the target application end, wherein the path address of each target picture at the target application end in the picture list is stored in a target format; The image list is converted into a binary large object file and sent to the server of the target browser, so that when the target browser responds to the upload image operation triggered by the target object, the target browser can upload the selected target image by calling the binary large object file from the server.
2. The method according to claim 1, characterized in that The step of generating a picture list according to the path address of each target picture on the target application end includes: According to the path address of each target image on the target application end, a data acquisition function of the webpage development toolkit of the target application end is called recursively to obtain data information of the target format of each target image; Generate a picture list according to the data information of the target format of each of the target pictures.
3. The method according to claim 2, characterized in that The step of converting the image list into a binary large object file and sending the file to the target browser server includes: Obtaining a data URL from the data information corresponding to the target image, wherein the data URL includes a type tag identifier and a data string; Decoding the data string to obtain a binary data stream; A binary large object file is generated according to the type tag identifier and the binary data stream.
4. The method according to claim 3, characterized in that The step of generating a binary large object file according to the type tag identifier and the binary data stream comprises: Create an initial byte array; Filling the binary data stream generated by decoding into the initial byte array to obtain an unsigned target byte array; A binary large object file is generated according to the unsigned target byte array and the type tag identifier.
5. A method for supporting an Android device to upload multiple pictures in a browser, applied to a target browser, characterized in that: include: In response to receiving a select picture operation triggered by a target object, sending a target link corresponding to the select picture operation to the target application end; The target browser jumps to the picture upload page, responds to the picture upload operation triggered by the target object, calls the binary large object file from the server, and uploads the selected target picture to the target browser.
6. The method according to claim 5, characterized in that In response to receiving the image selection operation triggered by the target object, before sending the target link corresponding to the image selection operation to the target application end, the method further includes: Get device type information, browser environment information, image selection mode, and SDK configuration status; When the device type information, the browser environment information, the image selection mode and the SDK configuration status meet preset conditions, in response to receiving a picture selection operation triggered by a target object, a target link corresponding to the picture selection operation is sent to the target application end.
7. A device that supports Android devices to upload multiple pictures in a browser, characterized in that: include: A function calling module, configured to call an image selection function of a webpage development toolkit of the target application end in response to a target link of a target browser triggered by a received target object, so that the target object selects a target image to be uploaded; A path address acquisition module, used to acquire the path address of each target image on the target application end after receiving the target object selection image completion indication information; A picture list generating module, configured to generate a picture list according to the path address of each target picture at the target application end, wherein the path address of each target picture at the target application end in the picture list is stored in a target format; The sending module is used to convert the image list into a binary large object file and send it to the server of the target browser, so that when the target browser responds to the upload image operation triggered by the target object, the target browser can upload the selected target image by calling the binary large object file from the server.
8. A device that supports Android devices to upload multiple pictures in a browser, characterized in that: include: A response module, configured to, in response to receiving a select picture operation triggered by a target object, send a target link corresponding to the select picture operation to the target application end; The calling module is used to jump to the picture upload page in the target browser, respond to the picture upload operation triggered by the target object, call the binary large object file from the server, and upload the selected target picture in the target browser.
9. A computer device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 4 or 5 to 6.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 4 or 5 to 6 is implemented.