temporary-uploader
v1.0.2
Published
This Package is Temporary File Uploader and direct link sender, This Package Support to most types of extentions.
Downloads
10
Maintainers
Readme
⬇️ Install Package
npm i temporary-uploader
ℹ️ Example
const { upload } = require("temporary-uploader");
const fs = require("fs");
async function uploadTest(){
const fileBuffer = await fs.readFileSync('./media/nima.jpg'); // your file path
const result = await upload(fileBuffer);
console.log(result);
}
uploadTest();
✅ Result
{
status: true,
message: 'File uploaded successfully',
url: 'https://temp-uploader.onrender.com/files/JAvNpGnspq.jpg',
fileSize: {
bytes: 60437,
kilobytes: '59.02',
megabytes: '0.06',
gigabytes: '0.00'
}
}