-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The IDL upload not work for alibaba cloud of mindsphere #316
Comments
@sn0wcat Could you please kindly help to check that? We are try to use the MindConnect Node-RED Agent v3.12.0 for IDL upload, and it blocked by this issue. |
@nrh387 I will add the support in the next version of the library. In the mean time as a workaround, you can use the node just to generate the signed URL (but don't do the upload) and do the actual file upload with standard node-red http nodes , while adding the necessary header. Sorry that i missed that, I don't have access to mindsphere on ALI... // Uncomment the next code line if you just want to generate an upload url (in msg._signedUrl)
// without actually uploading the file
msg._ignorePayload = true; |
@nrh387 I released an alpha version of the libary. Can you manually install the alpha version of the library over the currently installed one with npm install @mindconnect/mindconnect-nodejs@alpha in the folder where your nodes are installed. (e.g. in docker it would be /data folder) . The correct folder has flows.json, flows_cred_json etc and check if it is working? After the installation the package.json in the node_modules/@mindconnect/mindconnect-nodejs folder should have the version 3.19.0-1 |
@nrh387 any luck? |
@nrh387 I've just gotten access to a tenant in CN, I have the same behavior, looking into it. |
@nrh387 I got it running ;) It was my fault , I told you to install the alpha in the wrong directory, the correct one for hacking the dependency is It is working now, the example is here: https://playground.mindconnect.rocks/#flow/5eda11af.df734 I will release a new version some time later today, which should work as expected ;) |
@nrh387 the release is out, uninstalling and reinstalling the node so that it picks up the 3.19.0 version of the library should fix the problem. |
Yes, i verified and it works. Thanks so much @sn0wcat |
@sn0wcat May i know if the latest docker image have been updated for this change or not? Right now, i fixed it with npm install manually. https://hub.docker.com/r/mindconnect/node-red-contrib-mindconnect |
Not yet, sorry I forgot to start the docker image build I will take care of it today ... |
@sn0wcat that's great, please let me know when the docker image have been pushed to docker hub. Thanks a lot |
Describe the bug
A clear and concise description of what the bug is.
For alibaba cloud mindsphere, upload the file to datelake, the header need add the "Content-Type": "application/octet-stream", this is not need for eu1 and eu2 platform, but that's need for ali platform.
https://github.com/mindsphere/mindconnect-nodejs/blob/master/src/api/sdk/data-lake/data-lake.ts
Suggest add the logic check for alibaba signedURL as below:
public async PutFile(file: string | Buffer, signedUrl: string): Promise {
const myBuffer = typeof file === "string" ? fs.readFileSync(file) : (file as Buffer);
The text was updated successfully, but these errors were encountered: