Skip to content

Commit f100002

Browse files
authored
Merge pull request #8 from cube-root/fix-file-upload-redirect
fix file upload redirect
2 parents 2933f3f + ef8a71a commit f100002

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

lib/middleware/file-upload.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ const fileUpload = async (req, res, { path, originalPath } = {}) => {
2121
resolve();
2222
});
2323
});
24-
res.writeHead(302, { Location: originalPath });
24+
25+
res.writeHead(302, { Location: './' });
2526
return res.end();
2627
};
2728

package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "directory-serve",
3-
"version": "1.1.5",
3+
"version": "1.1.6",
44
"description": "Command line tool to share the directory",
55
"main": "./bin/index.js",
66
"scripts": {
@@ -9,6 +9,11 @@
99
},
1010
"keywords": [
1111
"file sharing",
12+
"http",
13+
"https",
14+
"cli",
15+
"http-server",
16+
"https-server",
1217
"android",
1318
"ios",
1419
"mobile",

0 commit comments

Comments
 (0)