0

我想创建一个 Chrome 扩展程序,允许您在上传图像之前调整图像大小。因此,在用户在文件选择器中选择文件后,我想显示一些选项的弹出窗口,生成调整大小的图像并填充该图像。这在 Chrome 扩展程序中是否可行(以前从未做过)?我需要的主要是一种优雅的方式来挂钩文件选择器或只是劫持所有输入[类型=文件]。

4

1 回答 1

0

I think you should "Hijack" it before the Chrome gets the alert that it should display a file picker dialog.

What I mean is this your script jumps in between, Executes and then says OK, Chrome, I want a file! not the website. the script gets the image. Resizes it. then submits it to the website anyhow. Like save it in a temp location then provide the site input tag with the temp file location..

Seems legit I think..

于 2013-04-27T10:04:59.957 回答