Skip to content

Commit 2acd975

Browse files
author
hyj1991
committed
src: support transfer coredump
1 parent 6c87b2c commit 2acd975

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

upload_file

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ fi
2626
UPLOADER=$DIR/uploader.js
2727

2828
#uploader server filepath token id
29-
$NODE_EXE "$UPLOADER" $1 $TARGET_PATH $3 $4
29+
$NODE_EXE "$UPLOADER" $1 $TARGET_PATH $3 $4 $5

uploader.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ var server = argv[0];
1414
var filepath = argv[1];
1515
var token = argv[2];
1616
var id = argv[3];
17+
var type = argv[4];
1718

1819
// check args
1920
if (!server || !filepath || !token || !id) {
@@ -46,7 +47,7 @@ fs.stat(filepath, function (err, stat) {
4647
shasum.update([os.hostname(), token, nonce, id].join(''));
4748
var sign = shasum.digest('hex');
4849

49-
var url = 'http://' + server + '/files/' + id + '?nonce=' + nonce + '&sign=' + sign;
50+
var url = 'http://' + server + '/files/' + id + '?nonce=' + nonce + '&sign=' + sign + '&type=' + type;
5051

5152
var gateway = process.env.GATEWAY;
5253
if (gateway) {

0 commit comments

Comments
 (0)