sazumifile
v1.0.2
Published
Sazumifile is one of the file uploader modules that can host your media, such as photos, videos, and audio. Sazumifile is directly integrated with the official web cdn.sazumi.moe, ensuring the security of your files on the cloud cdn.sazumi.moe. Your files
Downloads
5
Readme
upload-file Module
This module allows you to easily upload files to an external server using Node.js. The module utilizes Axios, FormData, and fs libraries to perform file uploads.
Installation
To use this module, you need to install it via npm.
npm install sazumifile
Usage
Import the uploadFile module:
const { uploadFile } = require('sazumifile');
const filePath = 'path/to/your/file.txt';
uploadFile(filePath)
.then((url) => {
console.log(`File uploaded successfully. URL: ${url}`);
})
.catch((error) => {
console.error(`Failed to upload file: ${error.message}`);
});