File upload modification for client applications
By introducing a simulated upload event generator and an embedded listener into the browser system to generate and process simulated upload events, the problem of flexibility and strategic control of file uploads in existing technologies is solved, enabling flexible modification and security control of files and directories.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- MICROSOFT TECHNOLOGY LICENSING LLC
- Filing Date
- 2021-03-30
- Publication Date
- 2026-05-12
AI Technical Summary
Existing browser systems lack flexibility when uploading files or directories. They cannot modify file content or selectively upload files during the upload event, nor can they block the upload of specific files or directories based on policies.
A simulated upload event generator and an embedded upload event listener are introduced into the client computing device to generate simulated upload events and data transfer objects. These are then propagated through the DOM tree and the logic is executed in the event handler, enabling modification and strategic control of files and directories.
It enables flexible modification and strategic control of files and directories before uploading, allowing or blocking the upload of specific files, thus enhancing the flexibility and security of the upload process.
Smart Images

Figure CN122019859A_ABST
Abstract
Description
[0001] Related applications This application is a divisional application of the invention patent application with application number 202180038840.5 and invention title "File Upload and Modification in Client Application". Background Technology
[0002] Web pages presented in a browser interface often provide interactive components, such as drag-and-drop mechanisms and / or dialog boxes, allowing users to select files or directories to upload to a remote system, such as a server. For example, when a user drags a file or directory into a dropdown menu component on a webpage, the software on the client device receives an upload event and dispatches it to an event handler to retrieve the file (or a list of files in a directory) and transfer the file to a specific remote system. The upload event propagates without modification. Furthermore, when multiple files are uploaded in a single event, the system either transfers all files or rejects the upload. Going further, an upload event triggered by dragging a directory into a dropdown menu will upload all files. Summary of the Invention
[0003] This abstract is provided to introduce selected concepts in a simplified form, which will be further described in the detailed description below. This abstract is not intended to identify key or essential features of the subject matter of the claims, nor is it intended to limit the scope of the subject matter of the claims.
[0004] A method and system are provided in a client computing device that can modify upload events before actual upload. In one aspect, the client computing device includes a system comprising a browser, a simulated upload event generator, a dispatcher, and an event handler. The browser is configured to render web pages. The simulated upload event generator includes program code configured to generate simulated upload events and corresponding simulated data transfer objects for uploading data using the web page. This program code is configured to execute in the client computing device. The dispatcher is configured to propagate the simulated upload events and corresponding simulated data transfer objects to upload event listeners on the web page. The event handler is configured to execute the simulated upload events.
[0005] In some embodiments, the client computing device includes an embedded upload event listener. Before the simulated upload event generator generates simulated upload events and simulated data transfer objects, the embedded upload event listener is configured to: intercept received upload events, read received upload events, discard received upload events from the upload event handler pipeline, and invoke code to execute logic on the received upload events.
[0006] Further features and advantages of the embodiments, as well as the structure and operation of various embodiments, will be described in detail below with reference to the accompanying drawings. It should be noted that the method and system are not limited to the specific embodiments described herein. Such embodiments presented herein are for illustrative purposes only. Other embodiments will be apparent to those skilled in the art based on the teachings contained herein. Attached Figure Description
[0007] The accompanying drawings, which are incorporated herein and form part of the specification, illustrate embodiments of the present application and, together with the description, further serve to explain the principles of the embodiments and enable those skilled in the art to make and use the embodiments.
[0008] Figure 1 This is a block diagram of a system for generating simulated upload events in a webpage to process files uploaded from a client device, according to an exemplary embodiment.
[0009] Figure 2 This is a flowchart illustrating a method for generating simulated upload events to process files uploaded from a client device, according to an exemplary embodiment.
[0010] Figure 3 This is a system block diagram, according to an exemplary embodiment, for intercepting received upload events by an embedded upload event listener and generating simulated upload events based on the received upload events.
[0011] Figure 4 This is a flowchart, according to an exemplary embodiment, of a method for intercepting received upload events by an embedded upload event listener and invoking code to execute logic on the received upload events.
[0012] Figure 5 This is a flowchart, according to an exemplary embodiment, of a method for sending a query to a server regarding a received upload event and receiving a response including instructions for generating a simulated upload event.
[0013] Figure 6 This is an example block diagram of a processor-based computer system that can be used to implement various embodiments.
[0014] The features and advantages of the embodiments described herein will become more apparent from the following detailed description taken in conjunction with the accompanying drawings, in which similar reference numerals identify corresponding elements throughout. In the drawings, similar reference numerals generally denote identical, functionally similar, and / or structurally similar elements. The first appearance of an element on the drawing is indicated by the leftmost digit of the corresponding reference numeral. Detailed Implementation
[0015] I. Introduction This specification and accompanying drawings disclose one or more embodiments that encompass the features of the disclosed embodiments. The scope of these embodiments is not limited to the aspects disclosed herein. The disclosed embodiments are merely illustrative of the intended scope, and modifications to the disclosed embodiments are also included. The embodiments are defined by the appended claims.
[0016] The terms "an embodiment," "embodiment," "exemplary embodiment," etc., used in this specification indicate that the described embodiment may include specific features, structures, or characteristics, but each embodiment does not necessarily include that specific feature, structure, or characteristic. Furthermore, such phrases do not necessarily refer to the same implementation. Additionally, when a specific feature, structure, or characteristic is described in relation to an embodiment, it is proposed that, to the knowledge of those skilled in the art, that feature, structure, or characteristic be implemented in relation to other embodiments, whether explicitly described or not.
[0017] Furthermore, it should be understood that the spatial descriptions used in this document (e.g., "up", "down", "upward", "left", "right", "downward", "top", "bottom", "vertical", "horizontal", etc.) are for illustrative purposes only, and the actual implementation of the structures described herein can be spatially arranged in any direction or manner.
[0018] In this discussion, unless otherwise stated, adjectives such as "substantially" and "approximately" modifying one or more features of the embodiments of this disclosure as conditions or relational features are to be understood as meaning that the condition or feature is defined as being within the operationally acceptable tolerances of the application of the embodiment for its purpose.
[0019] Numerous exemplary embodiments are described below. It should be noted that the headings of any section / subsection provided herein are not intended to be limiting. This document describes embodiments throughout, and embodiments of any type may be included under any section / section. Furthermore, embodiments disclosed in any section / subsection may be combined in any way with any other embodiments described in the same and / or different sections / subsections.
[0020] II. Exemplary Implementation Scheme.
[0021] As mentioned above, current browser-based systems have limited capabilities when uploading files or directories to remote systems such as servers. For example, a user can trigger an upload event in a webpage using interactive components (such as drag-and-drop boxes or dialog boxes) to select files or directories for upload. For instance, one can select files, multiple files, directories, multiple directories, or combinations thereof (i.e., one or more files and / or one or more directories). However, once an upload event is received, the event handler cannot modify the event. For example, it cannot modify the content or name of the files selected for upload. Furthermore, when uploading a group of files or a directory using a webpage's drag-and-drop box or dialog box, the system either allows all files to be transferred or refuses to upload all files. The system may not allow the transfer of a subset of files while blocking the transfer of another subset of files included in the upload event. Moreover, when uploading a directory by dragging and dropping, it is not possible to prevent individual files within the directory from being uploaded based on upload policies.
[0022] This document describes exemplary embodiments for controlling file and directory upload events (related to a web page) to a remote device, such as a server, by generating simulated upload events. For example, simulated upload events and corresponding simulated data transfer objects (e.g., event objects) suitable for browser processing can be generated for uploading one or more files and / or one or more directories. The simulated data transfer object may include or indicate the file and / or directory to be uploaded, along with corresponding metadata. The browser dispatches the simulated upload event and the corresponding simulated data transfer object, propagating along the path of the Document Object Model (DOM) tree to the simulated upload event listener registered in the DOM tree. The simulated upload event and the simulated data transfer object can then be propagated through one or more event handlers (e.g., an event handler chain) to process the one or more files and / or one or more directories and perform an upload operation based on the simulated upload event and the simulated data transfer object. In some embodiments, web page elements (e.g., buttons, drag-and-drop boxes, input dialogs, etc.) may be rendered in the web page to receive user input, thereby triggering the execution of the simulated upload event. In other embodiments, the simulated upload event may be triggered by non-user events, such as timer output, the DOM reaching a ready state, or other state changes of elements in the DOM tree, or may be triggered in other ways.
[0023] In some embodiments, the user-activated interactive element that triggers the generation of a mock event for an upload operation can be an existing input element in a webpage for selecting a file or directory to upload, such as a dialog box or dropdown for drag-and-drop operations (e.g., uploading a file and / or directory to a server). An upload event is received when the existing upload input element is activated by the user. A mock upload event listener can be embedded in an element in the DOM tree, above (before) any other DOM element, that element contains a registered event listener to capture received upload events (e.g., events triggered by drag-and-drop or dialog box input). The embedded mock upload event listener can capture, read, and / or analyze the received upload events and can remove the received upload events from the DOM's event handling flow. The embedded mock upload event listener can invoke (synchronous or asynchronous) code to execute logic related to the received upload event. For example, the invoked code can generate mock upload events and mock data transfer objects (e.g., based on the received upload event) suitable for browser processing, replacing the received upload event. As described above, the simulated data transfer object can include files and / or directories specified in the received upload event (e.g., specified based on drag-and-drop gestures or selections in a dialog box). An embedded simulated upload event listener can send simulated events with the simulated data transfer object (e.g., as parameters) to an event handler, and it can propagate through one or more event handlers to process one or more files and / or directories, performing upload operations based on the simulated upload event and the simulated data transfer object.
[0024] In some embodiments, a simulated upload event may be generated based on a previously received (or existing) upload event. For example, a simulated upload event may include more, fewer, or different processing steps than the received upload event. In some embodiments, a simulated upload event may add steps to modify the content of one or more files (e.g., encrypt files) and / or rename one or more files before the upload operation. In some embodiments, a simulated upload event may indicate that the upload of a portion or subset of files or directories indicated in the simulated data transfer object may be blocked, while the upload of other files indicated in the data transfer object may be allowed. Furthermore, a user's rejection of an upload operation for a single file in a directory selected by a drag-and-drop gesture may be allowed or blocked based on a check of the upload policy. The upload policy may be stored locally on the client's computing device or on a remote device, such as a proxy server or web server.
[0025] In some embodiments, the embedded simulated upload event listener sends a query to the proxy server. This query includes a request for a specified file and / or directory. In its response to the embedded simulated event listener, the proxy server returns instructions to process the file and / or directory before uploading it to the service provider's server, or to refuse the upload of one or more files and / or directories. The proxy server can determine the instructions based on a file upload policy applicable to the upload request. For example, the upload policy may specify criteria for taking certain actions, or indicate how to handle certain types of files or directories (e.g., modify file content, encrypt file content, rename files, refuse the transfer of certain types of files, etc.). The simulated event generator generates simulated upload events and corresponding simulated data transfer objects based on the instructions returned from the proxy server.
[0026] The simulated upload event generator described in this article can take various forms, such as as a browser extension written in a scripting language (e.g., JavaScript® developed by the Mozilla Foundation in Mountain View, California), scripting language code that modifies existing events received via web page elements, new scripting language code, scripting language code injected as a hook library in a web page, or other scripting language code.
[0027] Examples of methods for generating simulated upload events in a webpage can be implemented in various ways. For example, Figure 1 This is a block diagram of a system 100 according to an exemplary embodiment, which generates simulated upload events in a webpage to process files uploaded from a client device. Figure 1 As shown, system 100 includes a client computing device 102 and a service provider server 120, which are communicatively coupled via a network 130. The client computing device 102 includes a browser 104 that renders a web page 106. The web page 106 includes a simulated upload event generator 108, a simulated upload event 110, a simulated data transfer object 112, a dispatcher 114, an upload event listener 116, and an event handler 118.
[0028] Client computing device 102 can be any suitable computing device, such as mobile computing devices (e.g., Microsoft® Surface® devices, personal digital assistants (PDAs), laptops, notebook computers, tablets such as Apple iPad™, netbooks, etc.), mobile phones (e.g., cell phones, smartphones such as Apple iPhones, phones running the Google® Android™ operating system, Microsoft Windows® phones, etc.), wearable computing devices (e.g., head-mounted devices including smart glasses such as Google® Glass™, Oculus VR, LLC’s Oculus Rift®, fixed computing devices such as desktop computers or PCs (personal computers), game consoles / systems (e.g., Microsoft Xbox®, Sony PlayStation®, Nintendo Wii®, or Switch®, etc.), home appliances, set-top boxes, etc.
[0029] Service provider server 120 is implemented in one or more computing devices, such as desktop computers, servers, mobile devices, etc. Service provider server 120 is configured to respond to requests received from client computing device 102 via network 130. Service provider server 120 may be a web server including one or more websites and may process incoming network requests received from client computing device 102 via network 130 using Hypertext Transfer Protocol (HTTP) and other related protocols. Service provider server 120 may be configured to store, process, and deliver web pages and content to client computing device 102. For example, web pages delivered to client computing device 102 may include Hypertext Markup Language (HTML) files, which may include images, hyperlinks, files, style sheets, scripts, graphics, text content, etc. Network 130 may be or include any type of communication network, including local area network (LAN), wide area network (WAN), personal area network (PAN), or a combination of communication networks, such as the Internet.
[0030] Client computing device 102 is configured to communicate with service provider server 120 via network 130. Client computing device 102 may be configured to send requests to service provider server 120 to access services provided therethere. For example, web browser 104 may be a client application running on client computing device 102, configured to connect to the web server of service provider server 120 and retrieve web pages such as web page 106 for rendering on client computing device 102. In one embodiment, browser 104 is configured to build a DOM tree based on web page 106, render the content of web page 106, and display web page 106 in the display area of the user interface of client computing device 102 (e.g., in the tab of browser 104).
[0031] In some embodiments, web page 106 is accessed from service provider server 120 when web browser 104 receives a Uniform Resource Locator (URL) address as user input via the address bar (not shown) of web browser 104. Web page 106 is a file that can be written in HTML (Hypertext Markup Language) or other suitable languages and may include or reference executable code written in a scripting language (such as JavaScript®) to enable dynamic behavior. Web page 106 may be rendered in web browser 104 to include interactive elements (e.g., drag-and-drop boxes, dialog boxes, buttons, etc.) for receiving user input. For example, interactive elements may be used to initiate a file or directory upload operation to upload one or more files and / or one or more directories to service provider server 120.
[0032] Note that although the JavaScript® scripting language and JavaScript® scripts are frequently discussed in connection with the embodiments herein, they are discussed for illustrative purposes, and further scripting language types apply in the embodiments.
[0033] The simulated upload event generator 108 may include scripting language code (e.g., JavaScript®) configured to generate a simulated upload event 110 and a simulated data transfer object 112 for processing and uploading files and / or directories to the service provider server 120. The simulated upload event 110 may be a scripting language event object (e.g., a JavaScript® event) that can be created by calling a constructor in JavaScript® that constructs the simulated upload event 110. The simulated data transfer object 112 may be generated separately or may be included in the simulated upload event 110. The simulated data transfer object 112 is a valid data structure of the browser 104. The structure of the simulated data transfer object 112 simulates or mimics the structure of a data transfer object that would otherwise be created natively by the browser 104. In other words, one of the properties in the simulated upload event 110 is the simulated data transfer object 112, whose structure mimics the structure of an object created by calling an existing JavaScript® constructor. The simulated data transfer object 112 holds the data selected to be uploaded to the service provider server 120. The simulated upload event 110 is configured to cause a simulated or altered execution flow for file or directory processing and / or upload actions. Simulated upload event 110 may cause analysis and / or processing of the file or directory before it is transferred to service provider server 120. Simulated data transfer object 112 may be used for processing and / or upload operations. For example, simulated data transfer object 112 may include metadata such as filename or file size, or file content. In some embodiments, the metadata of simulated data transfer object 112 may also include file locations in directories and / or subdirectories.
[0034] Dispatcher 114 may include code configured to dispatch a simulated upload event 110 (including a simulated data transfer object 112 as a parameter) to web page 106 to perform processing and upload operations on files specified (or included) in the simulated data transfer object 112 based on the simulated upload event 110. For example, upload event listener 116 may receive the simulated upload event 110 and the simulated data transfer object 112 from dispatcher 114 and forward them to event handler 118 to propagate the execution flow based on the simulated upload event 110 and the simulated data transfer object 112. In some embodiments, event handler 118 may include multiple event handlers (e.g., a chain of event handlers through which the simulated upload event 110 and / or the simulated data transfer object 112 are propagated).
[0035] The simulated upload event generator 108 can be triggered to execute in various ways. For example, a button configured to receive user input (e.g., click) can be presented in web page 106, triggering the simulated upload event generator 108 to generate a simulated upload event 110 and a simulated data transfer object 112. In another example, a timer can be configured in web page 106 or browser 104 to trigger the simulated upload event generator 108 to generate the simulated upload event 110 and the simulated data transfer object 112 periodically or at one or more specified times. In yet another example, the simulated upload event generator 108 can be triggered to generate the simulated upload event 110 and the simulated data transfer object 112 when web page 106 is fully loaded into browser 104, or based on the progress of an asynchronous task.
[0036] In some embodiments, upload event listener 116 and / or event handler 118 may be registered in the DOM tree of web page 106 and may be defined to perform one or more operations on one or more files and / or one or more directories before transmitting the same content to service provider server 120. For example, event handler 118 may be configured to rename a file before uploading it (e.g., rename the file to include a username or date in the filename, etc.). In another example, event handler 118 may be configured to modify the content of one or more files before the upload operation (e.g., encrypt the file or edit parts of the file, etc.). In yet another example, event handler 118 is configured to analyze simulated upload events 110 and simulated data transfer objects 112 and determine whether the upload operation should be allowed or blocked for each specified file or directory. For example, before uploading a file directory, event handler 118 may be configured to analyze each file in that directory relative to a defined upload criterion or policy and may only upload files in that directory that conform to the criterion or satisfy the policy. Additionally, event handler 118 can be configured to modify one or more files in a directory to meet standards or policies before uploading the directory or files from the directory. Furthermore, event handler 118 can be configured to change the list of files in the directory or create a file system for uploading to service provider server 120.
[0037] In one embodiment, event handler 118 is configured to create one or more files to be uploaded to service provider server 120. For example, a file upload button element can be added to web page 106 as a browser extension (e.g., using script code). Unlike existing file upload drag-and-drop input elements or file upload dialog input elements, which allow users to select one or more files and / or one or more directories for upload, user input received at the browser extension file upload button (e.g., a click) can trigger a mock upload event generator 108 to generate a mock upload event 110 and a mock data transfer object 112. The mock upload event 110 can be captured by event listener 116 and propagated through event handler 118. Event listener 116 can be configured to create a new file, populate the file with some content, and upload the new file to service provider server 120. This example use case allows developers to test the website's upload process by generating a new file and uploading it to service provider server 120.
[0038] The simulated upload event generator 108 can be configured in various ways. For example, the simulated upload event generator 108 can be a browser extension, including code written in a scripting language (e.g., JavaScript®). In another example, the simulated upload event generator 108 can include a hook library configured to intercept received upload events passed to the DOM and generate simulated upload events 110 and simulated data transfer objects 112 to propagate in a "simulated" execution flow (e.g., for modifying a file or modifying an upload operation), which differs from the normal execution flow of the received upload event. This "simulated" execution flow may include processing by an event handler 118.
[0039] In embodiments, system 100 can operate in various ways to perform its functions. For example, Figure 2 Flowchart 200, according to an exemplary embodiment, provides a method for generating a simulated upload event 110 from a web page 106 for processing a file to be uploaded from a client device 102. In one embodiment, flowchart 200 may be executed by the client computing device 102, particularly by a browser 104. For illustrative purposes, reference is made to... Figure 1 To describe Figure 2 Flowchart 200.
[0040] Figure 2Flowchart 200 begins with step 202. In step 202, a webpage is rendered in a browser on a client computing device. For example, browser 104 may receive a URL for webpage 106 at service provider server 120, based on user input. Browser 104 may send a request for webpage 106 to service provider server 1020 and, in response, receive webpage 106 from service provider server 120. Browser 104 then renders webpage 106, retrieving objects indicated in webpage 106 (e.g., images, videos, etc.) as needed for rendering. In some embodiments, webpage 106 may include interactive elements for receiving user input (e.g., drag-and-drop boxes, dialog boxes, browser extension buttons for simulating upload events, etc.). Interactive elements may be used to initiate file and / or directory upload operations to process and upload one or more files and / or one or more directories to service provider server 120. Browser 104 may construct a DOM for webpage 106 and register upload event listeners 116 and event handlers 118 in one or more elements of the DOM.
[0041] In step 204, program code configured to execute on the client computing device generates a simulated upload event and a corresponding data transfer object for uploading data using a webpage. For example, a simulated upload event generator 108 may execute on the client computing device 102 to generate a simulated upload event 110 and a simulated data transfer object 112 for processing and / or uploading one or more files and / or one or more directories from the client computing device 102 to the service provider server 120 via network 130. Execution of the simulated upload event generator 108 may be triggered in various ways, such as by user input (e.g., a click event) in an element presented on the web page 106, or by non-user events, such as timer output, the DOM reaching a ready state, or other state changes of elements in the DOM tree. The simulated data transfer object 112 may include metadata such as filename, file size, or file content. In some embodiments, the simulated data transfer object 112 may also include file locations in directories and / or subdirectories. In some embodiments, the simulated upload event generator 108 may create a new file to upload, populate the new file with content, and include (or specify) the new file in the simulated data transfer object 112. Alternatively or additionally, the simulated upload event generator 108 may create a directory of files to be uploaded and include it (or specify it) in the simulated data transfer object 112.
[0042] In step 206, the simulated upload event and the corresponding data transfer object are propagated to the webpage's upload event listener. For example, dispatcher 114 can schedule the simulated upload event 110, which includes the simulated data transfer object 112 as a parameter, into the execution flow of the DOM of web page 106. For example, upload event listener 116 can receive the simulated upload event 110 and the simulated data transfer object 112 from dispatcher 114 and forward them to event handler 118 to propagate the execution flow based on the simulated upload event 110 and the simulated data transfer object 112. In some embodiments, event handler 118 may include multiple event handlers (e.g., a chain of event handlers through which the simulated upload event 110 and / or the simulated data transfer object 112 are propagated).
[0043] In step 208, a simulated upload event is executed. For example, event handler 118 may process or create one or more files and / or one or more directories specified in simulated data transfer object 112 and upload one or more files and / or one or more directories to service provider server 120 via network 130. As described above, in one example, event handler 118 may rename one or more files before uploading them (e.g., rename files to include a username or date in the filename, etc.). In another example, event handler 118 may modify the contents of one or more files before the upload operation (e.g., encrypt a file or edit parts of a file, etc.). In yet another example, event handler 118 may analyze simulated upload event 110 and simulated data transfer object 112 and determine whether the upload operation should be allowed or denied for each specified file. For example, before uploading a file directory, event handler 118 may analyze each file in that directory relative to defined upload criteria or policies and only upload files in that directory that conform to the criteria or satisfy the policies. Additionally, event handler 118 may modify one or more specified files to meet the criteria or policies before uploading one or more files from that directory. Furthermore, event handler 118 can modify the file list in the directory or create a file system for uploading to service provider server 120. In one implementation, event handler 118 is configured to create one or more files for uploading to service provider server 120. For example, based on user input triggers via elements in web page 106, or based on non-user-triggered triggers in web page 106 or browser 104 (e.g., timer outputs, DOM states, etc.), simulated upload event generator 108 can generate simulated upload event 110 and simulated data transfer object 112. Simulated upload event 110 and simulated data transfer object 112 can be captured by event listener 116 and propagated through event handler 118. Event handler 118 can create a new file, populate the file with content, and upload the new file to service provider server 120.
[0044] Implementation schemes for generating simulated upload events in web pages can be implemented in various ways. For example, Figure 3 This is a block diagram of a system 300 according to an exemplary embodiment, the system being used to intercept received upload events by an embedded upload event listener and generate simulated upload events based on the received upload events. Figure 3As shown, system 300 includes elements of system 100 and other elements. System 300 includes a client computing device 102, a service provider 120, and a proxy server 350, all communicatively coupled via a network 130. The client computing device 102 includes a browser 104, which loads and renders a web page 106. The web page 106 includes a simulated upload event generator 108, a simulated upload event 110, a simulated data transfer object 112, a dispatcher 114, an upload event listener 116, an event handler 118, an embedded upload event listener 352, event modification code 354, and an input element 356. The proxy server 350 includes a mock event instruction generator 362. These features of system 300 are further described below.
[0045] In some embodiments, the simulated upload event generator 108 can generate simulated upload events 110 and simulated data transfer objects 112 by modifying the actual file upload event triggered by dragging and dropping or selecting a file from a dialog box in web page 106. One problem that arises when modifying file uploads is that different web services have different protocols between the client and server sides (e.g., multipart forms, different AJAX methods, JSON posts). However, web browsers tend to implement the same API for receiving files from the client itself, regardless of the client-server protocol implementation. Examples of APIs include (1) dragging and dropping files and / or directories (such as folders) into the browser; and (2) from <input type="file"> Select files and / or directories (e.g., select files from a dialog box). By filtering these APIs on the first (i.e., top-level) DOM element in the capture phase, you can modify or selectively allow or block all file upload attempts (including selectively allowing or blocking individual files in a directory based on policies), while ensuring that no file content is read by the browser without authorization.
[0046] An embedded upload event listener 352 is configured to intercept received upload events that are triggered when a user initiates an upload operation by dragging and dropping a file and / or directory or by selecting a file and / or directory from a dialog box in input element 356 on web page 106 (as described above). For example, a JavaScript® event is created when web page 106 receives user input to initiate a file upload operation by dragging and dropping or using dialog box input element 356. JavaScript® event propagation in the DOM consists of three phases: (1) capturing (downward), (2) targeting, and (3) bubbling (upward). The embedded event listener 352 can be registered during the capturing phase of the DOM tree during DOM initialization (e.g., on the DOM window or the topmost object), so that the code of the embedded event listener 352 is the first code executed in response to a user attempting to upload a file using drag-and-drop or dialog box file selection of input element 356. Thus, the embedded event listener 352 is configured to intercept raw JavaScript® events.
[0047] By intercepting raw JavaScript® events triggered by user upload requests based on drag-and-drop or dialog box input, the embedded upload event listener 352 can preempt the normal pipeline processing of raw JavaScript® events and provide an alternative flow for file or directory upload control. For example, the embedded upload event listener 352 can read raw received upload events for the normal upload event processing pipeline and synchronously or asynchronously invoke event modification code 354 of the mock event generator 108. Event modification code 354 is configured to execute logic on the raw received upload event to generate a mock upload event 110. For example, event modification code 354 can modify or replace the raw JavaScript® event to generate a mock upload event 110 and a mock data transfer object 112, which can propagate through the mock or modified execution flow via event handler 118. In this respect, the event modification code 354 of the mock upload event generator 108 can be script code injected as a hook library into web page 106.
[0048] Simulated upload event 110 can trigger more, fewer, or different processing steps than the received original upload JavaScript® event. For example, simulated upload event 110 can cause additional steps for modifying the content of one or more files (e.g., encrypting files) and / or renaming one or more files. In some implementations, simulated upload event 110 may cause uploads of a subset of files or directories indicated in simulated data transfer object 112 to be blocked, while other files may be allowed to be uploaded. Furthermore, the denial or permission of upload operations to one or more files, directories, and / or directories can be determined based on an examination of an upload policy, which may be stored on a local or remote device of client computing device 102, such as proxy server 350 or service provider server 120.
[0049] As described above, the simulated upload event generator 108 can take various forms. For example, the simulated upload event generator 108 may be or include a browser extension that can be written in a scripting language (e.g., JavaScript®) such as script code 364. In another example, the simulated upload event generator 108 may include scripting language code that modifies existing events (e.g., events triggered by drag-and-drop or dialog box input), such as event modification code 354. In another example, the simulated upload event generator 108 may include new scripting language code related to non-user event triggers or user input on new input elements (e.g., upload buttons) on web page 106. In yet another example, the simulated upload event generator 108 may include scripting language code injected into web page 106 as a hook library.
[0050] In general, in networked computer systems, proxy services are sometimes used to monitor internet traffic and enforce policy restrictions on user activity. However, when a user on a client device uses a client application running on the client (e.g., a browser application or a word processing application), the proxy service may fail to monitor the user's activity using that client application. For example, when a user uploads a file from client computing device 102, proxy server 350 may be unable to detect the user's action in order to apply policy rules, such as file or directory upload policies defined by the administrator of the tenant domain. As a result, the user may be able to perform actions that the administrator attempted to prevent when defining the policy rules (e.g., uploading unencrypted files or uploading certain restricted files).
[0051] System 300 can operate in various ways to perform its functions. For example, Figure 4Flowchart 400, according to an exemplary embodiment, provides a method for intercepting received upload events by an embedded upload event listener and invoking code to execute logic on the received upload event. In one embodiment, flowchart 400 may be executed by a client computing device 102. For illustrative purposes, reference is made to... Figure 3 right Figure 4 The flowchart 400 is described as follows.
[0052] Flowchart 400 begins with step 402. In step 402, an embedded upload event listener intercepts the received upload event. For example, a raw upload JavaScript® event may be triggered by the received input when a user selects one or more files and / or one or more directories for upload using the drag-and-drop box or dialog box of input element 356. Dispatcher 114 may dispatch the raw upload JavaScript® event to the DOM. The embedded upload event listener 352 may be registered on top of an event listener that normally captures the raw upload JavaScript® event, such that the code of the embedded event listener 352 first captures the raw JavaScript® event. In one example, the embedded event listener 352 may be registered during DOM initialization on the DOM window (e.g., the topmost object) during the capture phase, such that the code of the embedded event listener 352 is the first code to run when the user attempts to upload a file using the file selection via the drag-and-drop box or dialog box of input element 356, thereby intercepting the raw upload JavaScript® event.
[0053] In step 404, the received upload event is read. For example, the embedded upload event listener 352 may read and / or analyze the raw upload JavaScript® event. In one embodiment, the embedded upload event listener 352 determines whether the raw JavaScript® event is an event type that will be discarded in place of a substitute or will be modified. For example, the event type may be related to the specific user interface element that triggered the event, a specific in-page event type, or other event types that are expected to be discarded or modified (e.g., in a list of event types for discarding or modification).
[0054] In step 406, the received upload event is discarded from the upload event handler pipeline. For example, the embedded event listener 352 may discard the raw upload JavaScript® event from the normal execution flow of the event handler, which is registered in the DOM to handle upload events triggered by received file selection input for the upload operation, from the drag-and-drop box or dialog box of input element 356.
[0055] In step 408, the embedded event listener synchronously or asynchronously invokes code to execute logic in response to the received upload event. For example, the embedded event listener 352 may invoke event modification code 354 of the simulated upload event generator 108 to generate a simulated upload event 110 and a corresponding simulated data transfer object 112. As described above, the event modification code 354 may modify or replace the original upload JavaScript® event with the simulated upload event 110, which may trigger more, fewer, or different processing steps than the received original upload JavaScript® event. For example, the simulated upload event 110 may include additional steps for modifying content and / or renaming one or more files, or for allowing or blocking a subset of files or directories indicated in the simulated data transfer object 112. Furthermore, the upload of one or more files in a directory may be individually allowed or blocked based on a check of an upload policy, which may be stored on a local or remote device of the client computing device, such as a proxy server 350 or a service provider server 120.
[0056] Refer again Figure 3 In some embodiments, system 300 includes a proxy server 350. The proxy server 350 can communicatively connect to service provider server 120 and client computing device 102 via network 130. Service provider server 102 can support services and / or content accessible by client computing device 102 via proxy server 350 over network 130. When client computing device 102 attempts to access content and / or services on service provider server 120 (e.g., uploading one or more files and / or one or more directories to service provider server 120), this access can be monitored, controlled, and / or routed via proxy server 350.
[0057] The proxy server 350 may include a simulated event instruction generator 362, which includes code for applying rules and / or policies to requests from the client computing device 102 to upload one or more files and / or one or more directories to the service provider server 120.
[0058] In some embodiments, prior to generating the simulated upload event 110, the simulated upload event generator 108 is configured to send a query 358 to the proxy server 350 via network 130. The query 358 may include a request to upload one or more files and / or one or more directories to the service provider server 120. The query 358 may identify one or more files and / or one or more directories and include metadata about one or more files and / or one or more directories. Alternatively or additionally, the query 358 may include one or more files and / or one or more directories indicated in the request. The simulated event instruction generator 362 of the proxy server 350 may be configured to determine instructions sent in response 360 to the embedded simulated event listener 352 to process one or more files and / or one or more directories (e.g., modify file contents or rename files) prior to the upload operation. Alternatively or additionally, the simulated event instruction generator 362 may be configured to determine instructions sent in response 360 that individually reject or allow the upload of one or more files, one or more directories, and / or one or more files of the directory specified in query 358. The mock event instruction generator 362 can be configured to determine instructions based on file upload policies and / or rules applicable to the upload request. For example, the upload policy may indicate criteria for taking certain actions or instructions on how to process certain files or directories (e.g., modify file content, encrypt file content, rename files, refuse to transfer certain types of files and / or directories, etc.). The mock event generator 108 can be configured to receive instructions in the response 360 and generate a mock upload event 110 and a corresponding mock data transfer object 112 based on the return instructions from the proxy server 350.
[0059] As described above, system 300 can perform its functions in various ways. For example, Figure 5 Flowchart 500, according to an exemplary embodiment, provides a method for sending a query to a server regarding a received upload event and receiving a response including instructions for generating a simulated upload event. In one embodiment, the steps of flowchart 500 may be performed by a client computing device 102. For illustrative purposes, refer to... Figure 3 right Figure 5 The flowchart 500 is described as follows.
[0060] Flowchart 500 begins with step 502. In step 502, a query including metadata about the received upload event is sent to the proxy server. For example, the simulated upload generator 108 sends query 358 to the proxy 350 before generating simulated upload event 110 and simulated data transfer object 112. Query 358 may include upload requests for one or more files and / or one or more directories specified in query 358.
[0061] In step 504, a response to the query, including instructions, is received from the proxy server. For example, the simulated event instruction generator 362 can determine instructions for generating simulated upload event 110 and simulated data transfer object 112 based on the file upload policy applied to the upload request of query 358. The upload policy may indicate criteria for taking certain actions or how to handle certain files or directories (e.g., modifying file content, encrypting file content, renaming files, refusing transmission, etc.). This instruction may be sent in response 360 and received by the client computing device 102.
[0062] In step 506, the generation of the simulated upload event and the corresponding simulated data transfer object is based on instructions received from the proxy server. For example, the simulated event generator 108 can generate the simulated upload event 110 and the simulated data transfer object 112 based on instructions received from the proxy server 350 in response 360.
[0063] For example, in one embodiment, an embedded simulated upload event listener 352 sends a query 358 to a proxy server 350, including a request for one or more specified files and / or directories. The proxy server 350 may return instructions to the embedded simulated event listener 352 to process the one or more files and / or directories before uploading them. A simulated event instruction generator 362 can determine instructions based on a file upload policy applied to the upload request. For example, the upload policy may indicate criteria for taking certain actions or instructions on how to process certain files or directories (e.g., modify file content, encrypt file content, rename files, refuse to transfer certain types of files, etc.). A simulated event generator 108 can generate a simulated upload event 110 and a corresponding simulated data transfer object 112 based on the instructions returned in the response 360 from the proxy server 350.
[0064] III. Computer System Implementation Examples The embodiments described herein can be implemented in hardware, or in combination with hardware, software, and / or firmware. For example, the embodiments described herein can be implemented as computer program code / instructions configured to execute in one or more processors and stored in a computer-readable storage medium. Alternatively, the embodiments described herein can be implemented as hardware logic / electrical circuitry.
[0065] As described herein, the embodiments include, but are not limited to, Figure 1 System 100 Figure 3 System 300 and Figure 6The system 600, and any components and / or subsystems thereof. 6, and any components and / or sub-components thereof, and any operation and portion of the flowcharts / flowcharts described herein and / or further embodiments described herein, may be implemented in hardware, or any combination of hardware and software and / or firmware. This includes implementations as computer program code configured to execute in one or more processors and stored in a computer-readable storage medium, or implementations as hardware logic / circuit, such as in a system-on-a-chip (SoC), field-programmable gate array (FPGA), application-specific integrated circuit (ASIC), trusted platform module (TPM), and / or the like. An SoC may include an integrated circuit chip including one or more processors (such as microcontrollers, microprocessors, digital signal processors (DSPs), etc.), memory, one or more communication interfaces, and / or further circuitry and / or embedded firmware to perform its functions.
[0066] The embodiments described herein can be implemented in one or more computing devices similar to the mobile systems and / or computing devices in the fixed or mobile computer embodiments, including one or more features of the mobile systems and / or computing devices described herein, as well as alternative features. The description of the computing devices provided herein is for illustrative purposes and not for limitation. The embodiments can be implemented in many more types of computer systems, as will be known to those skilled in the art.
[0067] Figure 6 This is a block diagram of a processor-based computer system 600 that can be used to implement various embodiments. The client computing device 102, the service provider server 120, the network 130, and the proxy server 350 can each include any type of computing device, mobile or fixed, such as a desktop computer, server, video game console, etc. For example, any one of the client computing device 102, service provider server 120, network 130, and proxy server 350 can be any type of mobile computing device (e.g., Microsoft® Surface® device, personal digital assistant (PDA), portable computer, laptop, tablet computer such as Apple iPad™, netbook, etc.), mobile phone (e.g., mobile phone, smartphone such as Microsoft Windows® Phone, Apple iPhone, mobile phone implementing Google® Android™ operating system, etc.), wearable computing device (e.g., head-mounted devices including smart glasses such as Google® Glass™, Oculus VR, LLC’s Oculus Rift®, etc.), such as desktop computer or PC (personal computer), game console / system (e.g., Microsoft Xbox®, Sony PlayStation®, Nintendo Wii® or Switch®, etc.), etc.), etc.
[0068] The client computing device 102, service provider server 120, network 130, and proxy server 350 may each be implemented in one or more computing devices that include features similar to and / or alternative features to computing device 600 in the fixed or mobile computer embodiments. The description of computing device 600 provided herein is for illustrative purposes and not for limitation. Embodiments may be implemented in many other types of computer systems, as will be known to those skilled in the art.
[0069] like Figure 6 As shown, computing device 600 includes one or more processors, referred to as processor circuitry 602, system memory 604, and a bus 606 coupling various system components, including system memory 604, to processor circuitry 602. Processor circuitry 602 is electrical and / or optical circuitry implemented in one or more physical hardware electrical circuitry device elements and / or integrated circuit devices (semiconductor material chips or molds), serving as a central processing unit (CPU), microcontroller, microprocessor, and / or other physical hardware processor circuitry. Processor circuitry 602 can execute program code stored in a computer-readable medium, such as program code for operating system 630, application program 632, other programs 634, etc. Bus 606 represents one or more types of bus architectures, including a memory bus or memory controller, peripheral bus, accelerated graphics port, and a processor or local bus using any of these bus architectures. System memory 604 includes read-only memory (ROM) 608 and random access memory (RAM) 610. Basic input / output system 612 (BIOS) is stored in ROM 608.
[0070] The computing device 600 also includes one or more of the following drives: a hard disk drive 614 for reading from and writing to a hard disk, a disk drive 616 for reading from or writing to a removable magnetic disk 618, and an optical disk drive 620 for reading from or writing to a removable optical disk 622, such as a CD-ROM, DVD-ROM, or other optical media. The hard disk drive 614, disk drive 616, and optical disk drive 620 are connected to the bus 606 via a hard disk drive interface 624, a disk drive interface 626, and an optical disk drive interface 628, respectively. These drives and their associated computer-readable media provide the computer with non-volatile storage of readable instructions, data structures, program modules, and other data. While hard disks, removable magnetic disks, and removable optical disks are described, other types of hardware-based computer-readable storage media can also be used to store data, such as flash memory cards, digital video disks, RAM, ROM, and other hardware storage media.
[0071] Some program modules may be stored on a hard disk, magnetic disk, optical disk, ROM, or RAM. These programs include an operating system 630, one or more application programs 632, other programs 634, and program data 636. Application programs 632 or other programs 634 may include, for example, computer program logic (e.g., computer program code or instructions) for implementing client computing device 102, service provider server 120, network 130, proxy server 350, browser 104, web page 106, simulated upload event generator 108, script code 364, simulated upload event 110, simulated data transfer object 112, dispatcher 114, upload event listener 116, event handler 118, embedded upload event listener 352, event modification code 354, input element 356, simulated event instruction generator 362, query 358, response 360, flowchart 200, flowchart 400, flowchart 500, and / or further embodiments described herein. Program data 636 may include simulated upload event 110, simulated data transfer object 112, query 358, response 360 and / or further embodiments described herein.
[0072] Users can input commands and information to computing device 600 through input devices such as keyboard 638 and directional device 640. Other input devices (not shown) may include microphones, joysticks, gamepads, satellite antennas, scanners, touchscreens and / or touchpads, voice recognition systems that receive voice input, gesture recognition systems that receive gesture input, or similar devices. These and other input devices are typically connected to processor circuitry 602 via serial port interface 642 coupled to bus 606, but may be connected via other interfaces such as parallel ports, game ports, or Universal Serial Bus (USB).
[0073] Display screen 644 is also connected to bus 606 via an interface, such as video adapter 646. Display screen 644 can be external to computing device 600 or integrated into computing device 600. Display screen 644 can display information and also serve as a user interface for receiving user commands and / or other information (e.g., via touch, finger gestures, virtual keyboard, etc.). In addition to display screen 644, computing device 600 may include other peripheral output devices (not shown), such as speakers and printers.
[0074] Computing device 600 connects to network 648 (e.g., the Internet) via an adapter or network interface 650, modem 652, or other means for establishing communication on the network. Modem 652 can be internal or external and can be connected to bus 606 via serial port interface 642, such as... Figure 6As shown, other interface types can be used to connect to bus 606, including parallel interfaces.
[0075] As used herein, the terms "computer program medium," "computer-readable medium," and "computer-readable storage medium" refer to physical hardware media, such as hard disks associated with hard disk drive 614, removable magnetic disks 618, removable optical disks 622, other physical hardware media such as RAM, ROM, flash memory cards, digital video disks, compressed disks, MEM, nanotechnology-based storage devices, and further types of physical / tangible hardware storage media. Such computer-readable storage media are distinct from and do not overlap with communication media (which exclude communication media). Communication media embody computer-readable instructions, data structures, program modules, or other data in modulated data signals (such as carrier waves). The term "modulated data signal" refers to a signal whose one or more characteristics are set or altered in such a way as to encode information in the signal. By way of example, and not limitation, communication media include wireless media, such as acoustic, radio frequency, infrared, and other wireless media, as well as wired media. Embodiments of the invention also relate to such communication media, which are separate from and do not overlap with embodiments relating to computer-readable storage media.
[0076] As described above, computer programs and modules (including application program 632 and other programs 634) can be stored on a hard disk, magnetic disk, optical disk, ROM, RAM, or other hardware storage media. Such computer programs can also be received via network interface 650, serial port interface 642, or any other interface type. When executed or loaded by an application program, such computer programs enable computing device 600 to implement the features of the embodiments discussed herein. Therefore, such computer programs represent a controller for computing device 600.
[0077] Embodiments of the present invention also relate to computer program products comprising computer code or instructions stored on any computer-readable medium. Such computer program products include hard disk drives, optical disk drives, storage device packages, memory sticks, memory cards, and other types of physical storage hardware.
[0078] IV. Other embodiments and advantages In one embodiment, the system in the client computing device includes: a browser configured to render a webpage; a simulated upload event generator, including program code configured to generate simulated upload events and corresponding simulated data transfer objects for uploading data using the webpage. The program code is configured to execute in the client computing device. A dispatcher is configured to propagate the simulated upload events and corresponding simulated data transfer objects to upload event listeners on the webpage. An event handler is configured to execute the simulated upload events.
[0079] In one embodiment, the data includes files, multiple files, directories, or multiple directories.
[0080] In one embodiment, the simulated upload event performs at least one of the following: modifying a file, changing the filename, changing the content of a file, creating a file, changing the list of files in a directory, or creating a file system.
[0081] In one embodiment, the system further includes: an embedded upload event listener configured to intercept received upload events before a simulated upload event generator generates simulated upload events and corresponding simulated data transfer objects for use in uploading data using a webpage; read received upload events; discard received upload events from the upload event handler pipeline; and synchronously or asynchronously call code to execute logic on the received upload events.
[0082] In one embodiment, program code configured to generate simulated upload events and corresponding simulated data transfer objects for uploading data using a webpage is configured to modify the received upload events.
[0083] In one embodiment, the embedded upload event listener is configured to respond to drag-and-drop or selection inputs in the dialog element input of a webpage.
[0084] In one embodiment, the embedded upload event listener is registered to execute before any other event listeners on the webpage.
[0085] In one embodiment, the simulated upload event generator is configured to: send a query to a proxy server including metadata about a received upload event; and receive a response to the query from the proxy server, including instructions. The simulated upload event generator, including program code, is further configured to generate simulated upload events and corresponding simulated data transfer objects based on instructions received from the proxy server.
[0086] In one embodiment, the simulated upload event generator includes at least one of the following: script browser extension code; script code that modifies the received event; new script code; and script code injected as a hook library in the webpage.
[0087] In one embodiment, the simulated upload event generator is script code in a scripting language.
[0088] In one embodiment, a method in a client computing device includes: rendering a webpage in a browser on the client computing device; generating a simulated upload event and a corresponding simulated data transfer object for uploading data using the webpage by means of program code configured to execute in the client computing device; propagating the simulated upload event and the corresponding simulated data transfer object to an upload event listener of the webpage; and executing the simulated upload event.
[0089] In one embodiment, the simulated upload event performs at least one of the following: modifying a file, changing the filename, changing the content of a file, creating a file, changing the list of files in a directory, or creating a file system.
[0090] In one embodiment, before generating a simulated upload event and a corresponding simulated data transfer object by program code configured to execute in a client computing device for uploading data using a webpage, the method further includes: intercepting a received upload event via an embedded upload event listener; reading the received upload event; discarding the received upload event from the upload event handler pipeline; and synchronously or asynchronously invoking code via the embedded event listener to execute logic on the received upload event for the generation.
[0091] In one embodiment, the embedded upload event listener is registered to execute before any other event listeners on the webpage.
[0092] In one embodiment, the method further includes: sending a query to a proxy server including metadata about a received upload event; and receiving a response to the query from the proxy server including instructions. Generating simulated upload events and corresponding simulated data transfer objects by program code configured to execute on a client computing device for uploading data using a webpage is based on instructions received from the proxy server.
[0093] In one embodiment, the simulated upload event generator includes at least one of the following: script browser extension code; script code that modifies the received event; new script code; and script code injected into the webpage as a hook library.
[0094] In one embodiment, the simulated upload event generator is script code in a scripting language.
[0095] In one embodiment, a computer-readable medium has program code recorded thereon that, when executed by at least one processor, causes the at least one processor to perform a method, the method comprising: rendering a webpage in a browser of a client computing device; generating a simulated upload event and a corresponding simulated data transfer object using program code configured to execute in the client computing device for uploading data using the webpage; propagating the simulated upload event and the corresponding simulated data transfer object to an upload event listener of the webpage; and executing the simulated upload event.
[0096] In one embodiment, before generating a simulated upload event and a corresponding simulated data transfer object by program code configured to execute in a client computing device for uploading data using a webpage, the method further includes: intercepting a received upload event via an embedded upload event listener; reading the received upload event; discarding the received upload event from the upload event handler pipeline; and synchronously or asynchronously invoking code via the embedded event listener to execute logic on the received upload event for the generation.
[0097] In one embodiment, the method further includes: sending a query to a proxy server including metadata about a received upload event; and receiving a response to the query from the proxy server including instructions. The generation of simulated upload events and corresponding simulated data transfer objects by program code configured to execute on a client computing device for uploading data using a webpage is based on instructions received from the proxy server.
[0098] V. Conclusion While various embodiments of this application have been described above, it should be understood that they are merely illustrative and not limiting. Those skilled in the art will understand that various changes in form and detail may be made without departing from the spirit and scope of this application as defined in the appended claims. Therefore, the breadth and scope of this application should not be limited by any of the exemplary embodiments described above, but should be defined solely by the following claims and their equivalents.
Claims
1. A system in a client computing device, comprising: An embedded upload event listener is registered to be executed before one or more other event listeners on the webpage; A simulated upload event generator includes program code configured to generate simulated upload events and corresponding simulated data transfer objects for uploading data using the webpage, wherein the program code is configured to execute on the client computing device; The dispatcher is configured to propagate the simulated upload event and the corresponding simulated data transfer object to the upload event listener of the webpage; An event handler is configured to execute the simulated upload event.
2. The system according to claim 1, wherein the data includes files, multiple files, directories, or multiple directories.
3. The system according to claim 1, wherein the simulated upload event performs at least one of the following: Modify the file. Change the file name. Change the content of the file. Create a file. Change the list of files in the directory, or Create a file system.
4. The system according to claim 1, wherein before the simulated upload event generator generates a simulated upload event and a corresponding simulated data transfer object for use in uploading data using the webpage, the embedded upload event listener is configured to: Intercept received upload events; Read the received upload event; Discard the received upload event from the upload event handler pipeline; as well as Call the code synchronously or asynchronously to execute logic in response to the received upload event.
5. The system of claim 4, wherein the program code configured to generate a simulated upload event and a corresponding simulated data transfer object for uploading data using the webpage is configured to modify the received upload event.
6. The system of claim 4, wherein the embedded upload event listener is configured to respond to drag-and-drop input or selection input in the dialog element input of the webpage.
7. The system of claim 4, wherein the simulated upload event generator is configured as follows: Send a query to the proxy server, the query including metadata about the received upload event; and Receive a response to the query from the proxy server, the response including instructions; The simulated upload event generator, which includes program code, is also configured to generate the simulated upload event and the corresponding simulated data transfer object based on the instructions received from the proxy server.
8. The system of claim 1, wherein the simulated upload event is a replacement for the discarded upload event.
9. The system of claim 1, wherein the simulated upload event generator comprises at least one of the following: Script browser extension code; Modify the script code for the received events; New script code; or The script code injected into the webpage as a hook library.
10. The system according to claim 1, wherein the simulated upload event generator is script code in a scripting language.
11. A method in a client computing device, comprising: Register an embedded upload event listener that will be executed before one or more other event listeners on the webpage; Simulated upload events and corresponding simulated data transfer objects are generated by program code configured to execute on the client computing device for uploading data using the webpage; The simulated upload event and the corresponding simulated data transmission object are propagated to the upload event listener of the webpage; as well as Execute the simulated upload event.
12. The method of claim 11, wherein the simulated upload event performs at least one of the following: Modify the file. Change the file name. Change the content of the file. Create a file. Change the list of files in the directory, or Create a file system.
13. The method of claim 11, wherein before generating the simulated upload event and corresponding simulated data transfer object by program code configured to execute in the client computing device for uploading data using the webpage, the method further comprises: The received upload events are intercepted by the embedded upload event listener; Read the received upload event; Discard the received upload event from the upload event handler pipeline; as well as The embedded event listener synchronously or asynchronously invokes code to execute logic for the generation in response to the received upload event.
14. The method of claim 13, further comprising: Send a query to the proxy server, the query including metadata about the received upload event; as well as Receive a response to the query from the proxy server, the response including instructions; The generation of the simulated upload event and the corresponding simulated data transfer object by program code configured to execute on the client computing device for uploading data using the webpage is based on the instructions received from the proxy server.
15. The method of claim 11, wherein the simulated upload event is a replacement for a discarded upload event.
16. The method of claim 11, wherein the simulated upload event generator comprises at least one of the following: Script browser extension code; Modify the script code for the received events; New script code; or The script code injected into the webpage as a hook library.
17. The method according to claim 11, wherein the simulated upload event generator is script code in a scripting language.
18. A physical hardware computer-readable medium having program code recorded thereon, the program code causing the at least one processor to perform a method when executed by at least one processor, the method comprising: Register an embedded upload event listener that will be executed before one or more other event listeners on the webpage; Simulated upload events and corresponding simulated data transfer objects are generated by program code configured to execute on the client computing device for uploading data using the webpage; The simulated upload event and the corresponding simulated data transmission object are propagated to the upload event listener of the webpage; as well as Execute the simulated upload event.
19. The physical hardware computer-readable medium of claim 18, wherein before generating the simulated upload event and corresponding simulated data transfer object by program code configured to execute in the client computing device for uploading data using the webpage, the method further comprises: The received upload events are intercepted by the embedded upload event listener; Read the received upload event; Discard the received upload event from the upload event handler pipeline; as well as The embedded event listener synchronously or asynchronously invokes code to execute logic for the generation in response to the received upload event.
20. The physical hardware computer-readable medium of claim 19, further comprising: Send a query to the proxy server, the query including metadata about the received upload event; as well as Receive a response to the query from the proxy server, the response including instructions; The generation of the simulated upload event and the corresponding simulated data transfer object by program code configured to execute on the client computing device for uploading data using the webpage is based on the instructions received from the proxy server.
21. A system in a proxy server, the system comprising: processor; as well as A memory device storing program code to be executed by the processor, the program code including a simulated event instruction generator, the simulated event instruction generator: A command is determined for generating a simulated upload event from a client device to a service provider server, the command being determined in response to an upload request query received from the client device, wherein the command is determined based on an upload strategy applied to the upload request query from the client device; as well as Send the instruction to the client device.
22. The system of claim 21, wherein the instructions for generating a simulated upload event from the client device to the service provider server comprise: Instructions for generating a simulated data transfer object for the simulated upload event based on the upload strategy applied to the upload request query from the client device.
23. The system of claim 21, wherein the instruction determined for generating a simulated upload event from a client device to a service provider server is based on information regarding one or more files, one or more directories, or one or more files and one or more directories indicated in an upload event query received from the client device.
24. The system of claim 21, wherein the instruction determined for generating a simulated upload event from a client device to a service provider server is determined based on one or more files, one or more directories, or one or more files and one or more directories included in the upload event query received from the client device.
25. The system of claim 21, wherein the upload policy indicates at least one of the following criteria for taking a specific action or how to process a specific file or directory to generate the simulated upload event from the client device to the service provider server.
26. The system of claim 21, wherein the instructions include instructions for one or more of the following: modifying file content, encrypting file content, renaming a file, or rejecting the transfer of a specific type of file or directory.
27. The system of claim 21, wherein the instruction for generating the simulated upload event from the client device to the service provider server indicates individually denying or allowing the upload of one or more files, one or more directories, or one or more files in a directory.
28. The system of claim 21, wherein the upload request query is received from the client device at the proxy server after the client device receives an upload event triggered by a user or the system and before the client device executes the upload event in response to the trigger.
29. The system of claim 21, wherein sending instructions to the client device comprises: The proxy server returns the generated instructions to a simulated event listener embedded in the Document Object Model (DOM) on the client device for processing the simulated upload event before uploading the file or directory to the service provider's server.
30. A method in a proxy server, the method comprising: An instruction is determined to generate a simulated upload event from a client device to a service provider server, the instruction being determined in response to an upload request query received from the client device, wherein the determination of the instruction is based on an upload strategy applied to the upload request query from the client device; as well as Send the instruction to the client device.
31. The method of claim 30, wherein the instruction for generating a simulated upload event from the client device to the service provider server comprises: Instructions for generating a simulated data transfer object for the simulated upload event based on the upload strategy applied to the upload request query from the client device.
32. The method of claim 30, wherein the instruction for generating a simulated upload event from the client device to the service provider server is based on information regarding one or more files, one or more directories, or one or more files and one or more directories indicated in the upload event query received from the client device.
33. The method of claim 30, wherein the instruction for determining the simulated upload event from the client device to the service provider server is based on one or more files, one or more directories, or one or more files and one or more directories included in the upload event query received from the client device.
34. The method of claim 30, wherein the upload policy indicates one or both of a standard for taking a specific action or how to process a specific file or directory for generating the simulated upload event from the client device to the service provider server.
35. The method of claim 30, wherein the instructions include instructions for one or more of the following: modifying file content, encrypting file content, renaming a file, or rejecting the transfer of a specific type of file or directory.
36. The method of claim 30, wherein the instruction for generating the simulated upload event from the client device to the service provider server indicates individually denying or allowing the upload of one or more files, one or more directories, or one or more files in a directory.
37. The method of claim 30, wherein the upload request query is received from the client device at the proxy server after the client device receives an upload event triggered by a user or system and before the client device executes the upload event in response to the trigger.
38. The method of claim 30, wherein sending the instruction to the client device comprises: The proxy server returns the generated instructions to a simulated event listener embedded in the Document Object Model (DOM) on the client device for processing the simulated upload event before uploading the file or directory to the service provider's server.
39. A physical hardware computer-readable medium having program code recorded thereon, the program code causing the at least one processor to perform a method when executed by at least one processor, the method comprising: An instruction is determined to generate a simulated upload event from a client device to a service provider server, the instruction being determined in response to an upload request query received from the client device, wherein the determination of the instruction is based on an upload strategy applied to the upload request query from the client device; as well as Send the instruction to the client device.
40. The physical hardware computer-readable medium of claim 39, wherein the instructions for generating a simulated upload event from a client device to a service provider server comprise: Instructions for generating a simulated data transfer object for the simulated upload event based on the upload strategy applied to the upload request query from the client device.