Update index.js
Browse files
index.js
CHANGED
|
@@ -21,16 +21,16 @@ app.get('*', async (req, res) => {
|
|
| 21 |
method: 'GET',
|
| 22 |
url: 'https://api.xs.cx/upload/sg'
|
| 23 |
})
|
| 24 |
-
const upload_result = await http({
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
})
|
| 33 |
-
res.send(
|
| 34 |
} catch (e) {
|
| 35 |
res.send(e.toString())
|
| 36 |
}
|
|
|
|
| 21 |
method: 'GET',
|
| 22 |
url: 'https://api.xs.cx/upload/sg'
|
| 23 |
})
|
| 24 |
+
// const upload_result = await http({
|
| 25 |
+
// method: 'POST',
|
| 26 |
+
// url: upload_info.url,
|
| 27 |
+
// headers: {
|
| 28 |
+
// 'content-crc32': hash,
|
| 29 |
+
// 'authorization': upload_info.authorization
|
| 30 |
+
// },
|
| 31 |
+
// data: file.data
|
| 32 |
+
// })
|
| 33 |
+
res.send(upload_info.url)
|
| 34 |
} catch (e) {
|
| 35 |
res.send(e.toString())
|
| 36 |
}
|