firefox-addon-restartless

Replication of Form method with loadOneTab

大憨熊 提交于 2019-11-28 13:00:24
If I dynamically insert a form object into a page, submit and remove the form and it works fine. Here is an example of the form code: <form target="_blank" enctype="multipart/form-data" action="https://www.example.com/" method="POST"> <input value="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==" name="image_content" type="hidden"> <input value="" name="filename" type="hidden"> <input value="" name="image_url" type="hidden"> </form> When I try to do the same process with loadOneTab() , result POST is not

Replication of Form method with loadOneTab

99封情书 提交于 2019-11-27 07:25:31
问题 If I dynamically insert a form object into a page, submit and remove the form and it works fine. Here is an example of the form code: <form target="_blank" enctype="multipart/form-data" action="https://www.example.com/" method="POST"> <input value="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==" name="image_content" type="hidden"> <input value="" name="filename" type="hidden"> <input value="" name=

Convert URL to File or Blob for FileReader.readAsDataURL

前提是你 提交于 2019-11-27 06:53:31
Reference: FileReader.readAsDataURL Considering the following example: function previewFile(file) { var reader = new FileReader(); reader.onloadend = function () { console.log(reader.result); } reader.readAsDataURL(file); } It states: instanceOfFileReader.readAsDataURL(blob); blob: The Blob or File from which to read. How can a local file URL like: 'file:///C:/path-to/root.png' be passed to the readAsDataURL() Is FileReader() available in a Firefox Addon? This information is outdated as of now, but cannot be deleted. You can create File instances just by specifying a path when your code is

Convert URL to File or Blob for FileReader.readAsDataURL

烈酒焚心 提交于 2019-11-26 10:28:56
问题 Reference: FileReader.readAsDataURL Considering the following example: function previewFile(file) { var reader = new FileReader(); reader.onloadend = function () { console.log(reader.result); } reader.readAsDataURL(file); } It states: instanceOfFileReader.readAsDataURL(blob); blob: The Blob or File from which to read. How can a local file URL like: \'file:///C:/path-to/root.png\' be passed to the readAsDataURL() Is FileReader() available in a Firefox Addon? 回答1: This information is outdated