1.0.2 • Published 8 months ago
sazumifile v1.0.2
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}`);
});