
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
@filesonfly/node-sdk
Advanced tools
The @filesonfly/node-sdk
is a Node.js client library for interacting with the FilesOnFly API, allowing you to easily upload, retrieve, and manage files in your Node.js applications.
Install the SDK with npm:
npm install @filesonfly/node-sdk
Or with yarn:
yarn add @filesonfly/node-sdk
First, require and initialize the FilesOnFlySDK
:
const FilesOnFlySDK = require('@filesonfly/node-sdk');
const fof = new FilesOnFlySDK('https://api.filesonfly.com');
To use the SDK, you must first connect to the API with your authentication token:
const authToken = 'your-auth-token';
await fof.connect(authToken);
Upload a file using the sendFile
method:
const fs = require('fs');
const fileName = 'example.png';
const fileBuffer = fs.readFileSync('/path/to/your/file.png');
await fof.sendFile(fileName, fileBuffer);
Get file information using the getFile
method by file name or ID:
// Get by file name
const fileInfoByName = await fof.getFile('example.png');
// Get by file ID
const fileInfoById = await fof.getFile(1);
The SDK throws FoF_Exception
errors when API requests fail or validation errors occur. Use try-catch blocks to handle these exceptions:
try {
await fof.sendFile('file_name', fileBuffer);
} catch (error) {
if (error instanceof FoF_Exception) {
console.error('FilesOnFly error:', error.message);
} else {
console.error('Unexpected error:', error);
}
}
We welcome contributions to the @filesonfly/node-sdk
. If you have suggestions or improvements, please fork the repository and submit a pull request.
FAQs
NodeJS SDK for Files on Fly
The npm package @filesonfly/node-sdk receives a total of 0 weekly downloads. As such, @filesonfly/node-sdk popularity was classified as not popular.
We found that @filesonfly/node-sdk 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.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.