-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.api
More file actions
28 lines (22 loc) · 771 Bytes
/
test.api
File metadata and controls
28 lines (22 loc) · 771 Bytes
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
<?
const wait=time=>new Promise(res=>setTimeout(res,time));
const space="Ba4oTvQMY8ew04N8dcnM";
response.setHeader("Content-Type", "multipart/x-mixed-replace; boundary="+space);
console.log(file_type_nocompress)
let imageBuffer=fs.readFileSync("public/favicon.png");
response.write(`--${space}\n`);
response.write(`Content-Type: image/jpeg\n`);
response.write(`Content-Length: ${imageBuffer.length}\n\n`);
response.write(imageBuffer);
response.write(`\n`);
log("ysy");
await wait(2e3);
log("yay 2");
imageBuffer=fs.readFileSync("public/files/img/CMD.png");
response.write(`--${space}\n`);
response.write(`Content-Type: image/jpeg\n`);
response.write(`Content-Length: ${imageBuffer.length}\n\n`);
response.write(imageBuffer);
response.write(`\n`);
response.end();
?>