MCPcopy Create free account
hub / github.com/Xchristech2/Zenitsu-Bot / UploadFileUgu

Function UploadFileUgu

lib/uploader.js:42–58  ·  view source on GitHub ↗
(input)

Source from the content-addressed store, hash-verified

40}
41
42async function UploadFileUgu (input) {
43 return new Promise (async (resolve, reject) => {
44 const form = new BodyForm();
45 form.append("files[]", fs.createReadStream(input))
46 await axios({
47 url: "https://uguu.se/upload.php",
48 method: "POST",
49 headers: {
50 "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36",
51 ...form.getHeaders()
52 },
53 data: form
54 }).then((data) => {
55 resolve(data.data.files[0])
56 }).catch((err) => reject(err))
57 })
58}
59
60function webp2mp4File(path) {
61 return new Promise((resolve, reject) => {

Callers 1

urlCommandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected