@mgalacyber/file-uploader
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

https://nodei.co/npm/@mgalacyber/file-uploader.png?downloads=true&downloadRank=true&stars=true

FILE UPLOADER

This NPM package, file-uploader, is a versatile and efficient solution for handling file uploads in Node.js applications. It provides a seamless and easy-to-use interface to upload files of various types while offering essential features to enhance the overall user experience.

Features

  • File Expiry:

    • Uploaded files are automatically set to expire after 24 hours, ensuring a secure and efficient storage solution. This feature is particularly beneficial for applications that require temporary file storage.
  • Universal File Support:

    • The file-uploader is designed to support all types of files. Whether it's images, documents, audio, or any other file format, the package seamlessly handles the upload process, providing a versatile solution for a wide range of applications.

How It Works

The file-uploader is powered by the Universe CDN, which provides a reliable backend infrastructure for handling file uploads.

Installation

npm:

$ npm install @mgalacyber/file-uploader

yarn:

$ yarn add @mgalacyber/file-uploader

Simple to Use

CommonJs (CJS) syntax

const fileUploader = require("@mgalacyber/file-uploader");

ECMAScript Modules (ESM) syntax

import fileUploader from "@mgalacyber/file-uploader";

Example

const Path = require("path");
const fs = require("fs");

const filePath = Path.join(__dirname, "fileName.extension");
const fileContent = fs.readFileSync(filePath);

fileUploader(fileContent).then((result) => {
    console.log(result);
});

Package Sidebar

Install

npm i @mgalacyber/file-uploader

Weekly Downloads

2

Version

1.1.0

License

Apache-2.0

Unpacked Size

15.3 kB

Total Files

6

Last publish

Collaborators

  • mgalacyber