Feature Enhancement | enhance WebRequest.onBeforeRequest() API to provide uploaded files meta-data and content
Reported by
assaf.al...@gmail.com,
Dec 19
|
||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36 Steps to reproduce the problem: 1. we created a Chrome extension 2. In the Chrome extension we use chrome.WebRequest.onBeforeRequest.addListener function to receive a call before file uploads and form-text posting (see https://developer.chrome.com/extensions/webRequest#event-onBeforeRequest) 3. Open dropbox.com or gmail.com or box.com (or any other web-application that allows to attach/upload files to a web-application) 4. upload a file to the web-application using drag&drop or using file-browse dialog 5. the onBeforeRequest callback function in our Chrome extension is called by Chrome BUT it does NOT contain essential meta-data information about the file that is uploaded to be able to recognize the file. What is the expected behavior? the expected behavior is that the above Chrome API will be enhanced to provide the following meta-data via the "details" parameter of the callback function: 1. filename 2. file size 3. modification date 4. (optional) full path to the file The goal is to be able to detect the on the local file system the specific file(s) that was uploaded in order to protect organizations from data leakage via Chrome browser What went wrong? The Chrome API does not provide the meta-data information for files that are uploaded. Did this work before? N/A Does this work in other browsers? N/A Chrome version: 71.0.3578.98 Channel: stable OS Version: 10.0 Flash Version: the following 2 APIs do provide the meta-data information such as filename(with fake-path), size and modification date 1. document.addEventListener("drop", function(event) 2. document.addEventListener('change', function(event) More info: https://developer.mozilla.org/en-US/docs/Web/Events/drop has a parameter dataTransfer that contains the info. https://developer.mozilla.org/en-US/docs/Web/Events/change has a event.target.files array that includes the list of uploaded files meta-data.
,
Dec 19
,
Dec 20
assaf.almaz@ Thanks for the issue. As per the above description, this is a feature request to allow to enhance WebRequest.onBeforeRequest() API to provide uploaded files meta-data and content. Hence marking this as Untriaged for further updates from Dev. Thanks..
,
Dec 21
This isn't something the extensions team will get to in the near future. If someone wants to tackle this, the first step would be in figuring out what would be necessary to plumb these bits through, and whether all the information is available at the time onBeforeRequest is dispatched.
,
Dec 21
Adding to c#4. I don't see why this should belong on the web request api. Also, it might be helpful if you list why the web apis you listed (drop, change) do not suffice for your use case. |
||||
►
Sign in to add a comment |
||||
Comment 1 by dtapu...@chromium.org
, Dec 19