
Product
Introducing Repository Access Permissions and Custom Roles
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.
Official package to speed up uploads to the open source service OperaFR
Official OperaFR repository: https://github.com/Logic-Layer-Dev/OperaFR
The package's functions are centered around 3 main methods: instantiate, allocate and upload.
The instantiate function is responsible for creating an object capable of performing the upload tasks. It necessarily needs the following items to be spawned:
const operaUploaderLib = require("operafr");
{...}
const operaUploader = await operaUploaderLib.instantiate({
serverUrl: "localhost",
token: "<token>",
requestPort: 5555,
publishPort: 5556,
})
The requestPort and publishPort can be changed if the service is running on different ports on the target server.
| Key | Explanation |
|---|---|
| serverUrl | Server where OperaFR service is running |
| token | Authentication token obtained by the login route for the user representing the system. |
| requestPort | Port where the Request/Reply service is running |
| publishPort | Port where the Pull/Req service is running |
After instantiation, you can now perform the upload steps. To upload a file, you must use the allocate method.
const initialParams = await operaUploader.allocate("<filepath>", {
publicUrl: false,
folderId: <int> //Destiny folder id from server
});
The initialParams will receive this information structure if communication with the server is successful:
{
status: 201,
message: 'File created successfully',
system_filename: '374bcca8-a564-41b9-a61c-8f9fb3793956.<extension>', //Random string
public_url: null //Random string if publicUrl = true
}
The public_url can be used for later consumption of the file in the /files/<public_url> route. The system_filename will be used in the upload method to append the chunks to the correct file.
await operaUploader.upload(initialParams.systemFilename, "<filepath>",
{
chunckSize: (1024 * 1024) * 4 // 4MB example
});
After this call, the file chunks will go to the destination file created on the Opera server. The "await" can be excluded, since it is not necessarily necessary to wait for a response from the server. This way, the client side can be freed from waiting, making everything more dynamic.
The full code:
const operaUploaderLib = require("operafr");
async function main() {
const operaUploader = await operaUploaderLib.instantiate({
serverUrl: "localhost",
token: "<token>",
requestPort: 5555, //Default Port
publishPort: 5556, //Default Port
})
const initialParams = await operaUploader.allocate("<filepath>", {
publicUrl: false,
folderId: 4 //Example ID
});
await operaUploader.upload(initialParams.systemFilename, "<filepath>", {chunckSize: (1024 * 1024) * 4}); // 4MB example
}
main();
FAQs
Official package to speed up uploads to the open source service **OperaFR**
We found that operafr 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.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.

Product
Socket Firewall blocks malicious VS Code and Open VSX extensions before install, protecting developers from compromised editor marketplaces.