From d3ddd538ed8c71e9a70732186ec35ad817d7287e Mon Sep 17 00:00:00 2001 From: Mark Manguno Date: Thu, 12 Dec 2019 18:04:57 -0500 Subject: [PATCH] clarifications --- examples/filesharing-bot/filesharing-bot.js | 7 +++++-- package-lock.json | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/examples/filesharing-bot/filesharing-bot.js b/examples/filesharing-bot/filesharing-bot.js index 4850ceb..290e866 100644 --- a/examples/filesharing-bot/filesharing-bot.js +++ b/examples/filesharing-bot/filesharing-bot.js @@ -16,7 +16,9 @@ if (process.env.LP_CSDS) { } const agent = new Agent(conf); -const swift_domain = 'https://qa-objectstorage.dev.lprnd.net'; +// use the Domain API to find your account's domain for the "swift" service +// https://developers.liveperson.com/essential-resources-domain-api.html +const swift_domain = 'qa-objectstorage.dev.lprnd.net'; let openConvs = {}; @@ -136,7 +138,7 @@ function shareFile(convId, caption) { function uploadFile(convId, caption, domain, relativePath, params, callback) { const file = path.resolve(__dirname, 'lp-logo.jpeg'); - const url = `${domain}${relativePath}${params}`; + const url = `https://${domain}${relativePath}${params}`; fs.createReadStream(file).pipe(request.put(url, (err, response) => { if (err) { @@ -162,5 +164,6 @@ function downloadFile(relativePath) { console.log('path params: '); console.log('expires: ' + res.queryParams.temp_url_expires); console.log('signature: ' + res.queryParams.temp_url_sig); + console.log('url: ' + `https://${swift_domain}${res.relativePath}?temp_url_sig=${res.queryParams.temp_url_sig}&temp_url_expires=${res.queryParams.temp_url_expires}`); }); } diff --git a/package-lock.json b/package-lock.json index e510a85..0251ebf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "node-agent-sdk", - "version": "1.3.1", + "version": "1.3.2", "lockfileVersion": 1, "requires": true, "dependencies": {