WO2014040489A1 - Method and apparatus for uploading a file - Google Patents
Method and apparatus for uploading a file Download PDFInfo
- Publication number
- WO2014040489A1 WO2014040489A1 PCT/CN2013/082266 CN2013082266W WO2014040489A1 WO 2014040489 A1 WO2014040489 A1 WO 2014040489A1 CN 2013082266 W CN2013082266 W CN 2013082266W WO 2014040489 A1 WO2014040489 A1 WO 2014040489A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- file
- uploading
- url request
- ulwebview
- protocol header
- 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.)
- Ceased
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/06—Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/22—Parsing or analysis of headers
Definitions
- the present disclosure relates to the field of Internet technology and, more particularly, relates to methods and apparatus for uploading a file based on a webkit kernel browser.
- An iOS operating apparatus is an apparatus operated by handheld devices and developed by Apple Inc.
- the iOS and Mac OS X operating apparatus are based on Darwin, which is an open-source operating system published by Apple Inc. in year 2000.
- the iOS and Mac OS X operating systems are commercial operating systems that are Unix-like.
- Webkit is an open source browser kernel. Webkit is used as the browser kernel of iOS apparatus.
- the Webkit kernel has a clear source code structure and a rapid rendering speed.
- the iOS operating apparatus covers a great share in the global smart phone market and in the U.S. smart phone market.
- the user may access mailbox, microblogs, and websites at any time, and file-uploading has become a desired feature.
- the webkit kernel browser of the iOS operating apparatus does not have a file-uploading function.
- the iOS operating apparatus restricts application programs to access local file systems. In webkit-based browsers (i.e., webkit kernel browsers) for an input tab having the type of "file" on the webpage, the user cannot click on the image of the local file system to upload the file.
- the present disclosure provides a method for uploading a file based on a webkit kernel browser by using a UlWebView control in the webkit kernel browser to monitor a url request.
- the url request can be linked with a triggering button related to a file for uploading on a webpage. It is then determined whether the url request monitored by the UlWebView control contains an agreed protocol header. When it is determined that the url request contains the agreed protocol header, the file for uploading is received and uploaded. When it is determined that the url request does not contain the agreed protocol header, the file for uploading is not uploaded.
- an apparatus for uploading a file based on a webkit kernel browser can include a monitoring module, and a determination executing module.
- the monitoring module can be configured to use a UlWebView control in the webkit kernel browser to monitor a url request.
- the url request can be linked with a triggering button related to a file for uploading on a webpage.
- the determination executing module can be configured to determine whether the url request monitored by the UlWebView control contains an agreed protocol header. When the url request is determined that contains the agreed protocol header, the file for uploading is received and uploaded. When it is determined that the url request does not contain the agreed protocol header, the file for uploading is not uploaded.
- FIG. 1 depicts an exemplary method for uploading a file in accordance with various embodiments
- FIG. 2 depicts another exemplary method for uploading a file in accordance with various embodiments
- FIG. 3 depicts exemplary upload code in accordance with various embodiments
- FIG. 4 depicts an exemplary apparatus for uploading a file in accordance with various embodiments
- FIG. 5 depicts another exemplary apparatus for uploading a file in accordance with various embodiments
- FIG. 6 depicts an exemplary environment incorporating certain disclosed
- FIG. 7 depicts an exemplary server consistent with the disclosed embodiments.
- FIGS. 1-5 depict exemplary methods and apparatus for uploading a file based on a webkit kernel browser in accordance with various disclosed embodiments.
- the exemplary methods and apparatus can be implemented, for example, in an exemplary environment 600 as shown in FIG. 6.
- the environment 600 can include a server 604, a terminal/client
- terminal 606 (hereinafter referred as "terminal") 606, and a communication network 602.
- the server 604 and the terminal 606 may be coupled through the communication network 602 for information exchange, for example, Internet searching, webpage browsing, etc.
- information exchange for example, Internet searching, webpage browsing, etc.
- terminal 606 and server 604 are shown in the environment 600, any number of terminals 606 or servers 604 may be included, and other devices may also be included.
- the communication network 602 may include any appropriate type of communication network for providing network connections to the server 604 and terminal 606 or among multiple servers 604 or terminals 606.
- the communication network 602 may include the Internet or other types of computer networks or telecommunication networks, either wired or wireless.
- a terminal may refer to any appropriate user terminal device with certain computing capabilities, for example, a personal computer (PC), a work station computer, a notebook computer, a car computer (e.g., carrying in a car or other vehicles), a server computer, a hand-held computing device (e.g., a tablet computer), a mobile terminal (e.g., a mobile phone, a smart phone, an iPad, and/or an aPad), a POS (i.e., point of sale) device, or any other user-side computing device.
- the terms “terminal” and “terminal device” can be used interchangeably.
- the terminal 606 can include a browser such as a webkit kernel browser.
- a server may refer one or more server computers configured to provide certain server functionalities, for example, search engines and database management.
- a server may also include one or more processors to execute computer programs in parallel.
- the server 604 and the terminal 606 may be implemented on any appropriate computing platform.
- FIG. 7 shows a block diagram of an exemplary computing system 700 capable of implementing the server 604 and/or the terminal 606. As shown in FIG. 7,
- the exemplary computer system 700 may include a processor 702, a storage medium
- the processor 702 can include any appropriate processor or processors. Further, the processor 702 can include multiple cores for multi-thread or parallel processing.
- the storage medium 704 may include memory modules, for example, ROM, RAM, and flash memory modules, and mass storages, for example, CD-ROM, U-disk, removable hard disk, etc.
- the storage medium 704 may store computer programs for implementing various processes, when executed by the processor 702.
- peripherals 712 may include I/O devices, for example, keyboard and mouse
- the communication module 708 may include network devices for establishing connections through the communication network 602.
- the database 710 may include one or more databases for storing certain data and for performing certain operations on the stored data, for example, webpage browsing, database searching, etc.
- the terminal 606 may cause the server 604 to perform certain actions, for example, an Internet search or other database operations.
- the server 604 may be configured to provide structures and functions for such actions and operations. More particularly, the server 604 may include a data searching system for real-time database searching.
- a terminal for example, a mobile terminal involved in the disclosed methods and systems can include the terminal 606.
- FIG. 1 depicts an exemplary method for uploading a file in accordance with various embodiments. The exemplary method for uploading the file can be based on a webkit kernel browser.
- Step S 11 a UlWebView control in a webkit kernel browser is used to monitor a url request.
- the url request is linked with a triggering button related to a file for uploading on a webpage.
- Step S 12 it is determined whether the url request, monitored by the UlWebView control, contains an agreed protocol header.
- the url request is determined that contains the agreed protocol header, the file for uploading can be received and uploaded.
- the user can first click on the triggering button related to the file for uploading on the webpage, for example, by clicking on buttons of "upload”, "browse”, etc.
- the triggering button related to the file for uploading can be linked with the url request.
- the agreed protocol header can be pre-set as needed.
- the agreed protocol header can be pre-set to be http://wbupload or any other suitable protocol headers, without limitation.
- the disclosed methods for uploading a file based on the webkit kernel browser uses a form of a link to replace conventional input tabs.
- the UlWebView control in the webkit kernel browser is triggered to monitor a url request and to determine whether the url request contains the agreed protocol header.
- the file for uploading is received and uploaded. Otherwise, when it is determined that the url request does not contain the agreed protocol header, the file for uploading cannot be uploaded. This may solve the problems that the webkit kernel browser for conventional iOS apparatus cannot upload files.
- FIG. 2 depicts another exemplary method for uploading a file in accordance with various embodiments.
- the exemplary method for uploading the file can be based on a webkit kernel browser.
- Step S21 a UlWebView control in a webkit kernel browser is used to monitor a url request.
- the url request is linked with a triggering button related to a file for uploading on a webpage
- Step S22 it is determined whether the url request, monitored by the UlWebView control, contains agreed protocol header.
- Step S23 (including, e.g., Step 231, Step 232, Step 233, and Step 234) can be performed to receive and upload the file for uploading. Otherwise, when the url request is determined that does not contain the agreed protocol header, the file for uploading cannot be uploaded.
- Step 231 a file uploading request is received.
- the url request linked to the triggering button related to the file for uploading, can be, for example,
- nc3 is a fixed format with each of fund, func2, and func3 (e.g., js function names with no parentheses) having a specific name delivered depending on a server.
- the UlWebView control can be used to call the fund js function to obtain cookie values used for sending the file uploading request.
- the obtained cookies can be used to obtain the user's identity and/or other suitable information including, for example, which user is performing the file uploading.
- Step S232 a file selection box can be generated and popped up for selecting a file.
- the UlWebView control can be used to call the func3 js function to obtain a js element object.
- the client can design own algorithms to calculate a position for the file selection box to point to.
- Step S233 it is determined whether the file for uploading is selected.
- the selected file for uploading can then be uploaded.
- the client of the webkit kernel browser
- Exemplary upload code is shown in FIG. 3 for illustration purposes. Of course, the present disclosure is not limited thereto.
- Step S234 after the file uploading, the webpage is displayed.
- the UlWebView control can be used to call the related func2 js function to display the webpage following the upload of the file.
- a response body in a text format
- the webpage can be displayed after the uploading of the file.
- the disclosed methods for uploading a file based on the webkit kernel browser uses a form of a link to replace conventional input tabs.
- the UlWebView control in the webkit kernel browser is triggered to monitor a url request and to determine whether the url request contains the agreed protocol header.
- the file for uploading is received and uploaded. Otherwise, when it is determined that the url request does not contain the agreed protocol header, the file for uploading cannot be uploaded. This may solve the problems that the webkit kernel browser for conventional iOS apparatus cannot upload files.
- FIG. 4 depicts an exemplary apparatus 30 for uploading a file in accordance with various embodiments.
- the exemplary apparatus for uploading the file can be based on a webkit kernel browser.
- the exemplary apparatus 30 can include a monitoring module 31 and/or a determination executing module 32.
- the monitoring module 31 can be configured to use a UlWebView control in a webkit kernel browser to monitor a url request linked to a triggering button on a webpage that is related to a file for uploading.
- the determination executing module 32 can be configured to determine whether the url request, monitored by the UlWebView control, contains an agreed protocol header. When the url request is determined that contains the agreed protocol header, the file for uploading can be received and uploaded.
- the user can first click on the triggering button related to the file for uploading on the webpage, for example, by clicking on buttons of "upload”, "browse”, etc.
- the triggering button related to the file for uploading can be linked with the url request.
- the monitoring module 31 monitors the url request that contains the agreed protocol header, it is determined that the user triggers a file uploading request.
- the agreed protocol header can be pre-set as needed by a setting module 33.
- the agreed protocol header can be pre-set to be http://wbupload or any other suitable protocol headers, without limitation.
- the disclosed apparatus for uploading a file based on a webkit kernel browser uses a monitoring module to monitor the url request.
- the determination executing module is used to determine whether the url request contains the agreed protocol header. When it is determined that the url request contains the agreed protocol header, the file for updating can be received and uploaded. Otherwise, when it is determined that the url request does not contain the agreed protocol header, the file uploading cannot be performed. This solves the problems that the webkit kernel browser for conventional iOS apparatus cannot upload files.
- FIG. 5 depicts an exemplary apparatus 40 for uploading a file in accordance with various embodiments.
- the exemplary apparatus for uploading the file can be based on a webkit kernel browser.
- the exemplary apparatus 40 can include a monitoring module 41 and/or a determination executing module 42.
- the monitoring module 41 can be configured to use a UlWebView control in a webkit kernel browser to monitor a url request linked to a triggering button on a webpage that is related to a file for uploading.
- the determination executing module 42 can be configured to determine whether the url request, monitored by the UlWebView control, contains the agreed protocol header. When the url request is determined that contains the agreed protocol header, the file for uploading can be received and uploaded. Otherwise, when the url request is determined that does not contain the agreed protocol header, the file for uploading cannot be uploaded.
- the determination executing module 42 can include a receiving module 421 used to receive a file uploading request.
- the url request, linked to the triggering button related to the file for uploading can be, for example,
- the receiving module 421 can include a first calling module 4211 configured to use the UlWebView control to call the fund js function to obtain cookie values used for sending the file uploading request.
- the determination executing module 42 can also include a box pop-up module 422 configured to generate and pop up a file selection box.
- the box pop-up module 422 can include a second calling module 4221 configured to use the UlWebView control to call related js function to calculate a position for the file selection box to point to.
- the determination executing module 42 can further include a determination executing sub-module 423 configured to determine whether the file for uploading is selected. When the file for uploading is selected, the selected file can then be uploaded.
- the determination executing module 42 can further include a displaying module 424 configured to display the webpage after the uploading of the file.
- the displaying module 424 can include a third calling module 4241 configured to use the UlWebView control to call related js function to display the webpage following the uploading of the file.
- the disclosed apparatus for uploading a file based on a webkit kernel browser uses a monitoring module to monitor the url request.
- the determination executing module is used to determine whether the url request contains the agreed protocol header. When it is determined that the url request contains the agreed protocol header, the file for updating can be received and uploaded. Otherwise, when it is determined that the url request does not contain the agreed protocol header, the file uploading cannot be performed.
- each embodiment is progressively described, i.e., each embodiment is described and focused on difference between embodiments. Similar and/or the same portions between various embodiments can be referred to with each other.
- exemplary apparatus is described with respect to corresponding methods.
- the disclosed modules can be configured in one apparatus or configured in multiple apparatus as desired.
- the modules disclosed herein can be integrated in one module or in multiple modules.
- Each of the modules disclosed herein can be divided into one or more sub-modules, which can be recombined in any manner.
- suitable software and/or hardware may be included and used in the disclosed methods and systems.
- the disclosed embodiments can be implemented by hardware only, which alternatively can be implemented by software products only.
- the software products can be stored in a computer-readable storage medium including, e.g., ROM/RAM, magnetic disk, optical disk, etc.
- the software products can include suitable commands to enable a terminal device (e.g., including a mobile phone, a personal computer, a server, or a network device, etc.) to implement the disclosed embodiments.
- the disclosed methods for uploading a file based on the webkit kernel browser uses a form of a link to replace conventional input tabs.
- the UlWebView control in the webkit kernel browser is triggered to monitor a url request and to determine whether the url request contains the agreed protocol header.
- the file for uploading is received and uploaded. Otherwise, when it is determined that the url request does not contain the agreed protocol header, the file for uploading cannot be uploaded. This may solve the problems that the webkit kernel browser for conventional iOS apparatus cannot upload files.
- the disclosed apparatus for uploading a file based on a webkit kernel browser uses a monitoring module to monitor the url request.
- the determination executing module is used to determine whether the url request contains the agreed protocol header. When it is determined that the url request contains the agreed protocol header, the file for updating can be received and uploaded. Otherwise, when it is determined that the url request does not contain the agreed protocol header, the file uploading cannot be performed.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Information Transfer Between Computers (AREA)
Description
Description
METHOD AND APPARATUS FOR UPLOADING A FILE
CROS S-REFERENCES TO RELATED APPLICATIONS
[0001] This application claims priority to Chinese Patent Application No.
CN201210335644.7, filed on September 12, 2012, the entire contents of which are incorporated herein by reference.
FIELD OF THE DISCLOSURE
[0002] The present disclosure relates to the field of Internet technology and, more particularly, relates to methods and apparatus for uploading a file based on a webkit kernel browser.
BACKGROUND
[0003] An iOS operating apparatus is an apparatus operated by handheld devices and developed by Apple Inc. The iOS and Mac OS X operating apparatus are based on Darwin, which is an open-source operating system published by Apple Inc. in year 2000. The iOS and Mac OS X operating systems are commercial operating systems that are Unix-like. Webkit is an open source browser kernel. Webkit is used as the browser kernel of iOS apparatus. The Webkit kernel has a clear source code structure and a rapid rendering speed.
[0004] Currently, the iOS operating apparatus covers a great share in the global smart phone market and in the U.S. smart phone market. As a mobile terminal browser, the user may access mailbox, microblogs, and websites at any time, and file-uploading has become a desired feature. However, the webkit kernel browser of the iOS operating apparatus does not have a file-uploading function. The iOS operating apparatus restricts application programs to access local file systems. In
webkit-based browsers (i.e., webkit kernel browsers) for an input tab having the type of "file" on the webpage, the user cannot click on the image of the local file system to upload the file.
BRIEF SUMMARY OF THE DISCLOSURE
[0005] According to various embodiments, the present disclosure provides a method for uploading a file based on a webkit kernel browser by using a UlWebView control in the webkit kernel browser to monitor a url request. The url request can be linked with a triggering button related to a file for uploading on a webpage. It is then determined whether the url request monitored by the UlWebView control contains an agreed protocol header. When it is determined that the url request contains the agreed protocol header, the file for uploading is received and uploaded. When it is determined that the url request does not contain the agreed protocol header, the file for uploading is not uploaded.
[0006] According to various embodiments, there is also provided an apparatus for uploading a file based on a webkit kernel browser. The apparatus can include a monitoring module, and a determination executing module. The monitoring module can be configured to use a UlWebView control in the webkit kernel browser to monitor a url request. The url request can be linked with a triggering button related to a file for uploading on a webpage. The determination executing module can be configured to determine whether the url request monitored by the UlWebView control contains an agreed protocol header. When the url request is determined that contains the agreed protocol header, the file for uploading is received and uploaded. When it is determined that the url request does not contain the agreed protocol header, the file for uploading is not uploaded.
[0007] Other aspects or embodiments of the present disclosure can be understood by those skilled in the art in light of the description, the claims, and the drawings of the present disclosure.
BRIEF DESCRIPTION OF THE DRAWINGS
[0008] The following drawings are merely examples for illustrative purposes according to various disclosed embodiments and are not intended to limit the scope of the present disclosure.
[0009] FIG. 1 depicts an exemplary method for uploading a file in accordance with various embodiments;
[0010] FIG. 2 depicts another exemplary method for uploading a file in accordance with various embodiments;
[0011] FIG. 3 depicts exemplary upload code in accordance with various embodiments;
[0012] FIG. 4 depicts an exemplary apparatus for uploading a file in accordance with various embodiments;
[0013] FIG. 5 depicts another exemplary apparatus for uploading a file in accordance with various embodiments;
[0014] FIG. 6 depicts an exemplary environment incorporating certain disclosed
embodiments; and
[0015] FIG. 7 depicts an exemplary server consistent with the disclosed embodiments.
DETAILED DES CRIPTION
[0016] Reference will now be made in detail to exemplary embodiments of the disclosure, which are illustrated in the accompanying drawings. Wherever possible, the same reference numbers will be used throughout the drawings to refer to the same or like parts.
[0017] FIGS. 1-5 depict exemplary methods and apparatus for uploading a file based on a webkit kernel browser in accordance with various disclosed embodiments. The exemplary methods
and apparatus can be implemented, for example, in an exemplary environment 600 as shown in FIG. 6.
[0018] As shown in FIG. 6, the environment 600 can include a server 604, a terminal/client
(hereinafter referred as "terminal") 606, and a communication network 602. The server 604 and the terminal 606 may be coupled through the communication network 602 for information exchange, for example, Internet searching, webpage browsing, etc. Although only one terminal 606 and one server 604 are shown in the environment 600, any number of terminals 606 or servers 604 may be included, and other devices may also be included.
[0019] The communication network 602 may include any appropriate type of communication network for providing network connections to the server 604 and terminal 606 or among multiple servers 604 or terminals 606. For example, the communication network 602 may include the Internet or other types of computer networks or telecommunication networks, either wired or wireless.
[0020] A terminal, as used herein, may refer to any appropriate user terminal device with certain computing capabilities, for example, a personal computer (PC), a work station computer, a notebook computer, a car computer (e.g., carrying in a car or other vehicles), a server computer, a hand-held computing device (e.g., a tablet computer), a mobile terminal (e.g., a mobile phone, a smart phone, an iPad, and/or an aPad), a POS (i.e., point of sale) device, or any other user-side computing device. In various embodiments, the terms "terminal" and "terminal device" can be used interchangeably. In various embodiments, the terminal 606 can include a browser such as a webkit kernel browser.
[0021] A server, as used herein, may refer one or more server computers configured to provide certain server functionalities, for example, search engines and database management. A server may also include one or more processors to execute computer programs in parallel.
[0022] The server 604 and the terminal 606 may be implemented on any appropriate computing platform. FIG. 7 shows a block diagram of an exemplary computing system 700 capable of implementing the server 604 and/or the terminal 606. As shown in FIG. 7,
[0023] the exemplary computer system 700 may include a processor 702, a storage medium
704, a monitor 706, a communication module 708, a database 710, peripherals 712, and one or more bus 714 to couple the devices together. Certain devices may be omitted and other devices may be included.
[0024] The processor 702 can include any appropriate processor or processors. Further, the processor 702 can include multiple cores for multi-thread or parallel processing. The storage medium 704 may include memory modules, for example, ROM, RAM, and flash memory modules, and mass storages, for example, CD-ROM, U-disk, removable hard disk, etc. The storage medium 704 may store computer programs for implementing various processes, when executed by the processor 702.
[0025] Further, the peripherals 712 may include I/O devices, for example, keyboard and mouse, and the communication module 708 may include network devices for establishing connections through the communication network 602. The database 710 may include one or more databases for storing certain data and for performing certain operations on the stored data, for example, webpage browsing, database searching, etc.
[0026] In operation, the terminal 606 may cause the server 604 to perform certain actions, for example, an Internet search or other database operations. The server 604 may be configured to provide structures and functions for such actions and operations. More particularly, the server 604 may include a data searching system for real-time database searching. In various embodiments, a terminal, for example, a mobile terminal involved in the disclosed methods and systems can include the terminal 606.
[0027] FIG. 1 depicts an exemplary method for uploading a file in accordance with various embodiments. The exemplary method for uploading the file can be based on a webkit kernel browser.
[0028] In Step S 11 , a UlWebView control in a webkit kernel browser is used to monitor a url request. The url request is linked with a triggering button related to a file for uploading on a webpage.
[0029] In Step S 12, it is determined whether the url request, monitored by the UlWebView control, contains an agreed protocol header. When the url request is determined that contains the agreed protocol header, the file for uploading can be received and uploaded.
[0030] When a user needs to upload a file, the user can first click on the triggering button related to the file for uploading on the webpage, for example, by clicking on buttons of "upload", "browse", etc. In various embodiments, the triggering button related to the file for uploading can be linked with the url request. When the url request monitored by the UlWebView control in the webkit kernel browser contains the agreed protocol header, it is determined that the user triggers a file uploading request. Note that the agreed protocol header can be pre-set as needed. For example, the agreed protocol header can be pre-set to be http://wbupload or any other suitable protocol headers, without limitation.
[0031] The disclosed methods for uploading a file based on the webkit kernel browser uses a form of a link to replace conventional input tabs. When the triggering button is clicked by the user, the UlWebView control in the webkit kernel browser is triggered to monitor a url request and to determine whether the url request contains the agreed protocol header. When it is determined that the url request contains the agreed protocol header, the file for uploading is received and uploaded. Otherwise, when it is determined that the url request does not contain the agreed protocol header, the
file for uploading cannot be uploaded. This may solve the problems that the webkit kernel browser for conventional iOS apparatus cannot upload files.
[0032] FIG. 2 depicts another exemplary method for uploading a file in accordance with various embodiments. The exemplary method for uploading the file can be based on a webkit kernel browser.
[0033] In Step S21, a UlWebView control in a webkit kernel browser is used to monitor a url request. The url request is linked with a triggering button related to a file for uploading on a webpage
[0034] In Step S22, it is determined whether the url request, monitored by the UlWebView control, contains agreed protocol header. When the url request is determined that contains the agreed protocol header, Step S23 (including, e.g., Step 231, Step 232, Step 233, and Step 234) can be performed to receive and upload the file for uploading. Otherwise, when the url request is determined that does not contain the agreed protocol header, the file for uploading cannot be uploaded.
[0035] In Step 231, a file uploading request is received.
[0036] In various embodiments, the url request, linked to the triggering button related to the file for uploading, can be, for example,
http://wbupload://somehost/somepath?som
nc3, where http://wbupload is the agreed protocol header; somehost/somepath?somequery & is a post request url related to file uploading;
http://wbupload://somehost/somepath?som
nc3 is a fixed format with each of fund, func2, and func3 (e.g., js function names with no parentheses) having a specific name delivered depending on a server.
[0037] In this case, the UlWebView control can be used to call the fund js function to obtain cookie values used for sending the file uploading request. The obtained cookies can be used to obtain the user's identity and/or other suitable information including, for example, which user is performing the file uploading.
[0038] In Step S232, a file selection box can be generated and popped up for selecting a file.
For example, the UlWebView control can be used to call the func3 js function to obtain a js element object. The client can design own algorithms to calculate a position for the file selection box to point to.
[0039] In Step S233, it is determined whether the file for uploading is selected. When the file for uploading is selected, the selected file for uploading can then be uploaded. After the file is selected and the uploading starts, the client (of the webkit kernel browser) may provide an upload interface. Exemplary upload code is shown in FIG. 3 for illustration purposes. Of course, the present disclosure is not limited thereto.
[0040] In Step S234, after the file uploading, the webpage is displayed.
[0041] In this case, after the file is successfully uploaded, the UlWebView control can be used to call the related func2 js function to display the webpage following the upload of the file. For example, a response body (in a text format) can be used as a parameter of func2 js function. By calculating func2 js function, the webpage can be displayed after the uploading of the file.
[0042] The disclosed methods for uploading a file based on the webkit kernel browser uses a form of a link to replace conventional input tabs. When the triggering button is clicked by the user, the UlWebView control in the webkit kernel browser is triggered to monitor a url request and to determine whether the url request contains the agreed protocol header. When it is determined that the url request contains the agreed protocol header, the file for uploading is received and uploaded. Otherwise, when it is determined that the url request does not contain the agreed protocol header, the
file for uploading cannot be uploaded. This may solve the problems that the webkit kernel browser for conventional iOS apparatus cannot upload files.
[0043] FIG. 4 depicts an exemplary apparatus 30 for uploading a file in accordance with various embodiments. The exemplary apparatus for uploading the file can be based on a webkit kernel browser. The exemplary apparatus 30 can include a monitoring module 31 and/or a determination executing module 32.
[0044] The monitoring module 31 can be configured to use a UlWebView control in a webkit kernel browser to monitor a url request linked to a triggering button on a webpage that is related to a file for uploading.
[0045] The determination executing module 32 can be configured to determine whether the url request, monitored by the UlWebView control, contains an agreed protocol header. When the url request is determined that contains the agreed protocol header, the file for uploading can be received and uploaded.
[0046] When a user needs to upload a file, the user can first click on the triggering button related to the file for uploading on the webpage, for example, by clicking on buttons of "upload", "browse", etc. In various embodiments, the triggering button related to the file for uploading can be linked with the url request. When the monitoring module 31 monitors the url request that contains the agreed protocol header, it is determined that the user triggers a file uploading request. Note that the agreed protocol header can be pre-set as needed by a setting module 33. For example, the agreed protocol header can be pre-set to be http://wbupload or any other suitable protocol headers, without limitation.
[0047] The disclosed apparatus for uploading a file based on a webkit kernel browser uses a monitoring module to monitor the url request. The determination executing module is used to determine whether the url request contains the agreed protocol header. When it is determined that
the url request contains the agreed protocol header, the file for updating can be received and uploaded. Otherwise, when it is determined that the url request does not contain the agreed protocol header, the file uploading cannot be performed. This solves the problems that the webkit kernel browser for conventional iOS apparatus cannot upload files.
[0048] FIG. 5 depicts an exemplary apparatus 40 for uploading a file in accordance with various embodiments. The exemplary apparatus for uploading the file can be based on a webkit kernel browser. The exemplary apparatus 40 can include a monitoring module 41 and/or a determination executing module 42.
[0049] The monitoring module 41 can be configured to use a UlWebView control in a webkit kernel browser to monitor a url request linked to a triggering button on a webpage that is related to a file for uploading.
[0050] The determination executing module 42 can be configured to determine whether the url request, monitored by the UlWebView control, contains the agreed protocol header. When the url request is determined that contains the agreed protocol header, the file for uploading can be received and uploaded. Otherwise, when the url request is determined that does not contain the agreed protocol header, the file for uploading cannot be uploaded.
[0051] The determination executing module 42 can include a receiving module 421 used to receive a file uploading request. In various embodiments, the url request, linked to the triggering button related to the file for uploading, can be, for example,
http://wbupload://somehost/somepath?someque^
c3, where http://wbupload is the agreed protocol header; somehost/somepath?somequery & is a post request url related to file uploading;
http://wbupload://somehost/somepath?somequei &cookiejs=func1 &successjs=func2&position^ c3 is a fixed format with each of funcl, func2, and func3 (js function name with no parentheses) having a specific name delivered depending on a server.
[0052] The receiving module 421 can include a first calling module 4211 configured to use the UlWebView control to call the fund js function to obtain cookie values used for sending the file uploading request.
[0053] The determination executing module 42 can also include a box pop-up module 422 configured to generate and pop up a file selection box.
[0054] Optionally, the box pop-up module 422 can include a second calling module 4221 configured to use the UlWebView control to call related js function to calculate a position for the file selection box to point to.
[0055] The determination executing module 42 can further include a determination executing sub-module 423 configured to determine whether the file for uploading is selected. When the file for uploading is selected, the selected file can then be uploaded.
[0056] The determination executing module 42 can further include a displaying module 424 configured to display the webpage after the uploading of the file.
[0057] The displaying module 424 can include a third calling module 4241 configured to use the UlWebView control to call related js function to display the webpage following the uploading of the file.
[0058] The disclosed apparatus for uploading a file based on a webkit kernel browser uses a monitoring module to monitor the url request. The determination executing module is used to determine whether the url request contains the agreed protocol header. When it is determined that the url request contains the agreed protocol header, the file for updating can be received and uploaded. Otherwise, when it is determined that the url request does not contain the agreed protocol header, the file uploading cannot be performed. This solves the problems that the webkit kernel browser for conventional iOS apparatus cannot upload files.
[0059] It should be noted that, in the present disclosure each embodiment is progressively described, i.e., each embodiment is described and focused on difference between embodiments. Similar and/or the same portions between various embodiments can be referred to with each other. In addition, exemplary apparatus is described with respect to corresponding methods.
[0060] Note that, the term "comprising", "including" or any other variants thereof are intended to cover a non-exclusive inclusion, such that the process, method, article, or apparatus containing a number of elements also include not only those elements, but also other elements that are not expressly listed; or further include inherent elements of the process, method, article or apparatus. Without further restrictions, the statement "includes a " does not exclude other elements included in the process, method, article, or apparatus having those elements.
[0061] A person of ordinary skill in the art can understand that the modules included herein are described according to their functional logic, but are not limited to the above descriptions as long as the modules can implement corresponding functions. Further, the specific name of each functional module is used for distinguishing from on another without limiting the protection scope of the present disclosure.
[0062] In various embodiments, the disclosed modules can be configured in one apparatus or configured in multiple apparatus as desired. The modules disclosed herein can be integrated in one module or in multiple modules. Each of the modules disclosed herein can be divided into one or more sub-modules, which can be recombined in any manner.
[0063] One of ordinary skill in the art would appreciate that suitable software and/or hardware (e.g., a universal hardware platform) may be included and used in the disclosed methods and systems. For example, the disclosed embodiments can be implemented by hardware only, which alternatively can be implemented by software products only. The software products can be stored in a computer-readable storage medium including, e.g., ROM/RAM, magnetic disk, optical disk, etc.
The software products can include suitable commands to enable a terminal device (e.g., including a mobile phone, a personal computer, a server, or a network device, etc.) to implement the disclosed embodiments.
[0064] The embodiments disclosed herein are exemplary only. Other applications, advantages, alternations, modifications, or equivalents to the disclosed embodiments are obvious to those skilled in the art and are intended to be encompassed within the scope of the present disclosure.
INDUSTRIAL APPLICABILITY AND ADVANTAGEOUS EFFECTS
[0065] Without limiting the scope of any claim and/or the specification, examples of industrial applicability and certain advantageous effects of the disclosed embodiments are listed for illustrative purposes. Various alternations, modifications, or equivalents to the technical solutions of the disclosed embodiments can be obvious to those skilled in the art and can be included in this disclosure.
[0066] The disclosed methods for uploading a file based on the webkit kernel browser uses a form of a link to replace conventional input tabs. When the triggering button is clicked by the user, the UlWebView control in the webkit kernel browser is triggered to monitor a url request and to determine whether the url request contains the agreed protocol header. When it is determined that the url request contains the agreed protocol header, the file for uploading is received and uploaded. Otherwise, when it is determined that the url request does not contain the agreed protocol header, the file for uploading cannot be uploaded. This may solve the problems that the webkit kernel browser for conventional iOS apparatus cannot upload files.
[0067] The disclosed apparatus for uploading a file based on a webkit kernel browser uses a monitoring module to monitor the url request. The determination executing module is used to determine whether the url request contains the agreed protocol header. When it is determined that the url request contains the agreed protocol header, the file for updating can be received and uploaded. Otherwise, when it is determined that the url request does not contain the agreed protocol header, the file uploading cannot be performed. This solves the problems that the webkit kernel browser for conventional iOS apparatus cannot upload files.
REFERENCE SIGN LIST
Apparatus 30
Monitoring module 31
Determination executing module 32
Setting module 33
Apparatus 40
Monitoring module 41
Determination executing module 42
Receiving module 421
First calling module 4211
Box pop-up module 422
Second calling module 4221
Determination executing sub-module 423
Displaying module 424
Third calling module 4241
Environment 600
Communication network 602
Server 604
Terminal 606
Processor 702
Storage medium 704
Monitor 706
Communications 708
Database 710
Peripherals 712
Claims
1. A method for uploading a file based on a webkit kernel browser comprising:
using a UlWebView control in the webkit kernel browser to monitor a url request, wherein the url request is linked with a triggering button related to a file for uploading on a webpage;
determining whether the url request monitored by the UlWebView control contains an agreed protocol header; and
receiving and uploading the file for uploading, upon the condition that the url request contains the agreed protocol header, wherein the file for uploading is not uploaded upon the condition that the url request does not contain the agreed protocol header.
2. The method of claim 1, wherein, prior to using the UlWebView control to monitor the url request, the method further comprises:
setting the agreed protocol header.
3. The method of claim 1, wherein the receiving and uploading of the file comprises:
receiving a file uploading request;
generating and popping up a file selection box for selecting a file;
determining whether the file for uploading is selected;
uploading the selected file for uploading, upon the condition that the file for uploading is determined to be selected; and
displaying the webpage after the uploading of the file.
4. The method of claim 3, wherein the receiving of the file uploading request comprises:
using the UlWebView control to call a first js function to obtain a cookie value used for sending the file uploading request.
5. The method of claim 3, wherein the generating and popping up of the file selection box comprises:
using the UI Web View control to call a second js function to calculate a position for the file selection box to point to.
6. The method of claim 3, wherein the displaying of the webpage after the uploading of the file comprises:
using the UlWebView control to call a third js function to display the webpage following the uploading of the file.
7. An apparatus for uploading a file based on a webkit kernel browser comprising:
a monitoring module, configured to use a UlWebView control in the webkit kernel browser to monitor a url request, wherein the url request is linked with a triggering button related to a file for uploading on a webpage; and
a determination executing module, configured to determine whether the url request monitored by the UlWebView control contains an agreed protocol header, wherein the file for uploading is received and uploaded, upon the condition that the url request contains the agreed protocol header, or the file for uploading is not uploaded, upon the condition that the url request does not contain the agreed protocol header.
8. The apparatus of claim 7, further comprising:
a setting module, configured to set the agreed protocol header.
9. The apparatus of claim 7, wherein the determination executing module comprises:
a receiving module, configured to receive a file uploading request;
a box pop-up module, configured to generate and pop up a file selection box for selecting a file;
a determination executing sub-module, configured to determine whether the file for uploading is selected, wherein, upon the condition that the file for uploading is determined to be selected, the selected file for uploading is uploaded; and
a displaying module, configured to display the webpage after the uploading of the file.
10. The apparatus of claim 9, wherein the receiving module comprises:
a first calling module, configured to use the UlWebView control to call a first js function to obtain a cookie value used for sending the file uploading request.
11. The apparatus of claim 9, wherein the box pop-up module comprises:
a second calling module, configured to use the UlWebView control to call a second js function to calculate a position for the file selection box to point to.
12. The apparatus of claim 9, wherein the displaying module comprises:
a third calling module, configured to use the UlWebView control to call a third js function to display the webpage following the uploading of the file.
13. A non-transitory computer readable medium used in conjunction with an apparatus for uploading a file based on a webkit kernel browser, the computer readable medium comprising instructions for:
using a UlWebView control in the webkit kernel browser to monitor a url request, wherein the url request is linked with a triggering button related to a file for uploading on a webpage;
determining whether the url request monitored by the UlWebView control contains an agreed protocol header; and
receiving and uploading the file for uploading, upon the condition that the url request contains the agreed protocol header, wherein the file for uploading is not uploaded upon the condition that the url request does not contain the agreed protocol header.
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| SG11201501077QA SG11201501077QA (en) | 2012-09-12 | 2013-08-26 | Method and apparatus for uploading a file |
| US14/084,909 US20140075326A1 (en) | 2012-09-12 | 2013-11-20 | Method and apparatus for uploading a file |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201210335644.7 | 2012-09-12 | ||
| CN201210335644.7A CN103685379B (en) | 2012-09-12 | 2012-09-12 | File uploading method and device based on webkit kernel browsers |
Related Child Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| US14/084,909 Continuation US20140075326A1 (en) | 2012-09-12 | 2013-11-20 | Method and apparatus for uploading a file |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2014040489A1 true WO2014040489A1 (en) | 2014-03-20 |
Family
ID=50277602
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2013/082266 Ceased WO2014040489A1 (en) | 2012-09-12 | 2013-08-26 | Method and apparatus for uploading a file |
Country Status (4)
| Country | Link |
|---|---|
| CN (1) | CN103685379B (en) |
| MY (1) | MY175280A (en) |
| SG (1) | SG11201501077QA (en) |
| WO (1) | WO2014040489A1 (en) |
Families Citing this family (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105677666A (en) * | 2014-11-19 | 2016-06-15 | 中兴通讯股份有限公司 | File uploading method and device |
| CN107180107B (en) * | 2017-06-08 | 2020-12-29 | 山大鲁能信息科技有限公司 | Method and system for uploading selected files by mobile phone attachment under Ionic framework |
| CN109672710B (en) * | 2017-10-17 | 2022-09-13 | 阿里巴巴集团控股有限公司 | File uploading method, system and equipment |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101951405A (en) * | 2010-09-17 | 2011-01-19 | 中山大学 | Implement method of middleware of set top box based on webkit |
| CN101951401A (en) * | 2010-09-15 | 2011-01-19 | 青岛海信移动通信技术股份有限公司 | Method and device for uploading files in WebKit browser |
| WO2012021344A2 (en) * | 2010-08-11 | 2012-02-16 | Movik Networks | SYSTEM AND METHOD FOR QoS CONTROL OF IP FLOWS IN MOBILE NETWORKS |
| CN102360294A (en) * | 2011-10-18 | 2012-02-22 | 青岛海信移动通信技术股份有限公司 | Wap page display method and Wap page display device based on WebKit browser |
| CN102436391A (en) * | 2010-09-29 | 2012-05-02 | 卓望数码技术(深圳)有限公司 | Android WebKit control method and system |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6938042B2 (en) * | 2002-04-03 | 2005-08-30 | Laplink Software Inc. | Peer-to-peer file sharing |
| US8738749B2 (en) * | 2006-08-29 | 2014-05-27 | Digimarc Corporation | Content monitoring and host compliance evaluation |
-
2012
- 2012-09-12 CN CN201210335644.7A patent/CN103685379B/en active Active
-
2013
- 2013-08-26 SG SG11201501077QA patent/SG11201501077QA/en unknown
- 2013-08-26 MY MYPI2015700690A patent/MY175280A/en unknown
- 2013-08-26 WO PCT/CN2013/082266 patent/WO2014040489A1/en not_active Ceased
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2012021344A2 (en) * | 2010-08-11 | 2012-02-16 | Movik Networks | SYSTEM AND METHOD FOR QoS CONTROL OF IP FLOWS IN MOBILE NETWORKS |
| CN101951401A (en) * | 2010-09-15 | 2011-01-19 | 青岛海信移动通信技术股份有限公司 | Method and device for uploading files in WebKit browser |
| CN101951405A (en) * | 2010-09-17 | 2011-01-19 | 中山大学 | Implement method of middleware of set top box based on webkit |
| CN102436391A (en) * | 2010-09-29 | 2012-05-02 | 卓望数码技术(深圳)有限公司 | Android WebKit control method and system |
| CN102360294A (en) * | 2011-10-18 | 2012-02-22 | 青岛海信移动通信技术股份有限公司 | Wap page display method and Wap page display device based on WebKit browser |
Also Published As
| Publication number | Publication date |
|---|---|
| SG11201501077QA (en) | 2015-03-30 |
| CN103685379B (en) | 2018-04-20 |
| CN103685379A (en) | 2014-03-26 |
| MY175280A (en) | 2020-06-18 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| AU2013328901B2 (en) | Index configuration for searchable data in network | |
| US10209855B1 (en) | Concurrent display of masked views of applications between devices | |
| US20140082498A1 (en) | Method and mobile terminal device for independently playing a video | |
| US10146750B2 (en) | Method, apparatus, terminal, and storage medium for image processing | |
| CN104348919B (en) | Carry out the method, apparatus and browser of file download | |
| US20150120772A1 (en) | Method and system for information push | |
| TWI584149B (en) | Web page access request response method and device | |
| US20160380933A1 (en) | System and method for providing crowd-based technical support to smartphone users | |
| CN104978358B (en) | Method for displaying webpage fragments on desktop and capturing webpage fragments to desktop display system | |
| WO2022111047A1 (en) | Voice broadcasting method, computing device and computer storage medium | |
| US20140089397A1 (en) | Method, server, and client for pushing and displaying splash screen | |
| WO2014153970A1 (en) | Method and apparatus for text input protection | |
| WO2015021873A1 (en) | Method, platform server, and system of data pushing | |
| WO2014110929A1 (en) | Method, device, and system for uploading data | |
| US20140075326A1 (en) | Method and apparatus for uploading a file | |
| CN104537049B (en) | A kind of picture browsing method and device | |
| US9852451B1 (en) | Dynamic generation of content | |
| JP6257621B2 (en) | Method for displaying search result data, search server, and portable device | |
| WO2014040489A1 (en) | Method and apparatus for uploading a file | |
| TWI744216B (en) | Method and device for providing prompt information | |
| WO2014029358A1 (en) | Method and apparatus for switching search engine to repeat search | |
| US20140040823A1 (en) | Method and device for multi-window browsing | |
| US20140201233A1 (en) | Method, device, and system for uploading data | |
| PH12015500034B1 (en) | A web browser operation method and system | |
| WO2014194755A1 (en) | Method and apparatus for accessing a chat room |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 13837483 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 14/09/2015) |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 13837483 Country of ref document: EP Kind code of ref document: A1 |