Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,6 @@ mindconnect-nodejs-win.exe

# Webstorm
.idea

# markdown-help
markdown-help/**
3 changes: 3 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,6 @@ mindconnect-nodejs-win.exe

# Spellchecker files
.spelling

# markdown-help
markdown-help/**
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 3.19.0 - (Dove Vienna) - April 2022

- CLI: new `mdsp markdown-help` command to generate markdown help available at [opensource.mindsphere.io](https://opensource.mindsphere.io/docs/mindconnect-nodejs/cli/index.html#tab1anchor2)
- SDK: Data Lake - added support for mindsphere data upload in CN1 (on alibaba cloud) [[#316](https://github.com/mindsphere/mindconnect-nodejs/issues/316)]
- Bumped most depedencies

## 3.18.2 - (Hazelwood Vienna) - March 2022

- fixed missing date-fns dependency in package.json
Expand Down
168 changes: 138 additions & 30 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mindconnect/mindconnect-nodejs",
"version": "3.18.2",
"version": "3.19.0-1",
"description": "NodeJS Library for MindSphere Connectivity - TypeScript SDK for MindSphere - MindSphere Command Line Interface - MindSphere Development Proxy",
"main": "./dist/src/index.js",
"browser": "./dist/src/index.bundle.js",
Expand Down
13 changes: 11 additions & 2 deletions src/api/sdk/data-lake/data-lake.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,17 @@ export class DataLakeClient extends SdkClient {
const proxy = process.env.http_proxy || process.env.HTTP_PROXY;
const proxyHttpAgent: any = proxy ? new HttpsProxyAgent(proxy) : null;

// x-ms-blob is necessary on eu2 and is ignored on eu1
const request: any = { method: "PUT", headers: { "x-ms-blob-type": "BlockBlob" }, agent: proxyHttpAgent };
let headers;

// in china the Object Storage Service needs Content-Type to be application/octet-stream
if (this.GetGateway().toLowerCase().includes("mindsphere-in.cn")) {
headers = { "Content-Type": "application/octet-stream" };
} else {
// x-ms-blob is necessary on eu2 and is ignored on eu1
headers = { "x-ms-blob-type": "BlockBlob" };
}

const request: any = { method: "PUT", headers: headers, agent: proxyHttpAgent };
request.body = myBuffer;
const response = await fetch(signedUrl, request);
return response.headers;
Expand Down
Loading