Spaces:
Sleeping
Sleeping
File size: 1,119 Bytes
efadc45 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
/*╺╺╺╺╺╺╺╺╺╺╺╺╺╺╺╺╺╺╺╺╺╺╺╺╺╺╺
⭐PROJECT NAME:
SUBZERO WHATSAPP MD BOT
⭐DEVELOPER
MR FRANK
⭐ MY TEAM
XERO CODERS
⭐ OUR WEBSITE
https://github.com/ZwSyntax/SUBZERO-MD
© TRY DECRYPTING IF YOU CAN⚠
╺╺╺╺╺╺╺╺╺╺╺╺╺╺╺╺╺╺╺╺╺╺╺╺╺╺╺╺╺╺╺╺*/
const axios = require("axios");
const fs = require("fs");
const FormData = require("form-data");
async function shannzCdn(path) {
const form = new FormData();
const fileStream = fs.createReadStream(path);
form.append("file", fileStream);
try {
const response = await axios.post("https://endpoint.web.id/server/upload", form, {
headers: {
...form.getHeaders(),
},
});
return response.data
} catch (error) {
return error.message
}
}
module.exports = { shannzCdn }
|