tra-analysis/website/functions/node_modules/gcs-resumable-upload/build/src/cli.js

18 lines
487 B
JavaScript
Raw Normal View History

2019-01-06 19:14:45 +00:00
#!/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