tra-analysis/website/functions/node_modules/gcs-resumable-upload/build/src/cli.js
2019-01-06 13:14:45 -06:00

18 lines
487 B
JavaScript

#!/usr/bin/env node
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var upload = require('./');
var args = process.argv.slice(2);
var opts = {
bucket: args[0],
file: args[1]
};
process.stdin.pipe(upload(opts))
.on('error', console.error)
.on('response', function (resp, metadata) {
if (!metadata || !metadata.mediaLink)
return;
console.log('uploaded!');
console.log(metadata.mediaLink);
});
//# sourceMappingURL=cli.js.map