Open shamnad-sherief opened 1 year ago
Hi @shamnad-sherief , what version of the SDK and NodeJS are you using?
Hi @shamnad-sherief , what version of the SDK and NodeJS are you using?
"oci-sdk": "^2.68.0",
node -v >> v18.16.0
Hi, does your response has value? const response = await this.objectStorageClient.getObject(getObjectRequest); i got an empty response.value
@JJDSNT No problem with response value.
ReadableStream { locked: false, state: 'readable', supportsBYOB: false }
But it is quiet different from the old version.
@shamnad-sherief I have the same issue. Did you find a solution?
Later add. In node 20 getObject
returns a web stream, which needs to be converted to a node stream:
if (response.value instanceof Readable) {
return response.value;
}
return Readable.fromWeb(response.value);
I'm encountering an issue while using the GetObjectResponse object from the OCI Object Storage library. When trying to use the .pipe() method on the value property of the GetObjectResponse, I receive the following error:
TypeError: imageStream.pipe is not a function
Expected Behavior: The .pipe() method should work as expected on the value property, allowing the stream content to be piped to a response object.
Actual Behavior: Encountering the "TypeError: imageStreamValue.pipe is not a function" error when attempting to use .pipe() on the value property.
Below is my controller:-