
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
matrix-media
Advanced tools
MediaClient is a simple JavaScript class for uploading and downloading media files to/from a Matrix homeserver.
npm install matrix-media
(Replace with your actual package name or usage)
const MediaClient = require('matrix-media');
const client = new MediaClient({ token: 'YOUR_ACCESS_TOKEN' });
// Upload a file buffer
const mxcUri = await client.upload(fileBuffer, 'filename.ext');
// mxcUri example: "mxc://matrix.org/abcdefg"
// Download a file from Matrix (returns Uint8Array)
const fileData = await client.downloadBuffer(mxcUri);
fetch — Optional: custom fetch implementation (default: global fetch)token — Required: Matrix access token for authorizationbuffer — Buffer | Uint8Array | ArrayBuffer — File content to uploadfilename — string (optional) — Filename to use on upload (default: "upload.bin")Returns a Promise that resolves to the Matrix content URI (mxc://...).
The max upload size is ~50MB.
mxcOrMediaUrl — string — Matrix content URI (mxc://...) or direct download URLtimeout — number (optional) — Timeout in milliseconds (default: 5000)Returns a Promise resolving to the file data as a Uint8Array.
FAQs
Allows uploading files to matrix.org homeserver through media api.
We found that matrix-media demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.