Update index.js
Browse files
index.js
CHANGED
|
@@ -285,9 +285,9 @@ async function neko(buffer) {
|
|
| 285 |
if (disallowedExtensions.includes(ext)) {
|
| 286 |
throw new Error('Ekstensi file tidak diizinkan');
|
| 287 |
}
|
| 288 |
-
const blob = new Blob([buffer], { type: mime });
|
| 289 |
const formData = new FormData();
|
| 290 |
-
formData.append('file',
|
| 291 |
const response = await axios.post('https://cdn.nekohime.xyz/upload', formData, {
|
| 292 |
headers: {
|
| 293 |
'Content-Type': `multipart/form-data; boundary=${formData._boundary}`,
|
|
|
|
| 285 |
if (disallowedExtensions.includes(ext)) {
|
| 286 |
throw new Error('Ekstensi file tidak diizinkan');
|
| 287 |
}
|
| 288 |
+
//const blob = new Blob([buffer], { type: mime });
|
| 289 |
const formData = new FormData();
|
| 290 |
+
formData.append('file', buffer, {filename: 'file' + ext});
|
| 291 |
const response = await axios.post('https://cdn.nekohime.xyz/upload', formData, {
|
| 292 |
headers: {
|
| 293 |
'Content-Type': `multipart/form-data; boundary=${formData._boundary}`,
|