
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
stoneage-fileupload
Advanced tools
AJAX-like file upload for IE9 and below using form post to hidden iframe
Internet Explorer <=9 does not support file upload via XHR (AJAX). This module provides a fallback mechanism using a multipart/form-data
post to a hidden iframe.
It does nothing more than that, has zero dependencies, and is a plain CommonJS module.
npm install --save stoneage-fileupload
import fileupload from 'stoneage-fileupload'
const myFileInput = document.getElementById('myFileInput')
const handleUploaded = (response) => {
console.log(`${myFileInput.value} has been succesfully uploaded.`)
console.log(response)
}
myFileInput.onchange = () => {
fileupload([myFileInput], '/upload', { authorization: 'foo' }, handleUploaded)
}
fileupload(elements, url, params, callback)
elements
(Array<HTMLElement>) An array of file input elements. The files selected with these inputs will be uploaded.url
(string) The URL of the upload endpoint.params
(Object) Additional parameters which will be submitted as part of the form data.callback
(Function) The callback function to be invoked when the upload finished. It will receive the parsed post response as an argument.FAQs
AJAX-like file upload for IE9 and below using form post to hidden iframe
We found that stoneage-fileupload demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.