From 81a282af28bccc2bf063dbdf0450218cbf5f7fbd Mon Sep 17 00:00:00 2001 From: Jernej Pregelj Date: Mon, 17 Dec 2018 16:46:19 +0100 Subject: [PATCH] return file urls --- src/ocean/Ocean.ts | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/ocean/Ocean.ts b/src/ocean/Ocean.ts index 3131e65..c20ac8e 100644 --- a/src/ocean/Ocean.ts +++ b/src/ocean/Ocean.ts @@ -233,15 +233,8 @@ export default class Ocean { let url: string = serviceUrl + `?url=${cUrl}` url = url + `&serviceAgreementId=${serviceAgreementId}` url = url + `&consumerAddress=${consumer.getId()}` - Logger.log("Fetching asset from: ", url) - const response: any = await webConnector.get(url) - const responseBuffer: Buffer = await response.buffer() - const urlParts: string[] = cUrl.split("/") - const filename: string = urlParts[urlParts.length - 1] - Logger.debug(`Got response: filename is ${filename}, url is ${response.url}`) - files.push(responseBuffer.toString("utf8")) + files.push(url) } - Logger.log("Done downloading asset files.") cb(files) })