Spaces:
Paused
Paused
plsgivemeachane
commited on
Commit
·
a6d5905
1
Parent(s):
8983583
Error checking 2
Browse files
index.js
CHANGED
|
@@ -417,6 +417,8 @@ app.post("/auth/delete", async (req, res) => {
|
|
| 417 |
});
|
| 418 |
|
| 419 |
app.post("/file/upload", async (req, res) => {
|
|
|
|
|
|
|
| 420 |
upload.single("file")(req, res, async (err) => {
|
| 421 |
if(err) {
|
| 422 |
console.log(err)
|
|
|
|
| 417 |
});
|
| 418 |
|
| 419 |
app.post("/file/upload", async (req, res) => {
|
| 420 |
+
// Try to write file
|
| 421 |
+
fs.writeFileSync("uploads/" + req.body.filePath, 'TEST');
|
| 422 |
upload.single("file")(req, res, async (err) => {
|
| 423 |
if(err) {
|
| 424 |
console.log(err)
|