digitalnodecom / node-red-contrib-generic-s3

Generic S3 nodes for use in Node-RED
https://www.npmjs.com/package/@digitalnodecom/node-red-contrib-generic-s3
Apache License 2.0
3 stars 5 forks source link

MissingContentLength error #63

Open aperiodicchain opened 10 months ago

aperiodicchain commented 10 months ago

I can successfully connect to my local minio instance (and for example use the S3 list objects node). When using the S3 put object node, I am getting MissingContentLength: You must provide the Content-Length HTTP header. error.

I did some troubleshooting and this seems to be related: https://github.com/airblade/right_aws/commit/e6cf18db65a4921615c88cdf52a14dafe94139d8 Does this require an update of the package or is there another workaround suggested?

On a side note (likely unrelated): In client-s3-node field S3 endpoint is Red, indicating an error, although the value looks fine to me (and actually works, see list objects above): https://mesh:9000

rristov60 commented 10 months ago

Hi @aperiodicchain, thanks for this issue. I will investigate about the MissingContentLength error and see what's causing it and where it is coming from. When it comes to the endpoint, the issue is that the address of the endpoint is checked in the client-s3-node with regex which actually checks for a domain, so it's looking for a proper domain, and you pass just a mesh string. I will take a look at that as well and see how to modify the regex and wether it is a good idea to do that or not.

rristov60 commented 10 months ago

Hi @aperiodicchain, can you please if possible provide a bit more information on how to reproduce this error, so far I wasn't able to reproduce it and I just was able to find out that when you try to upload object which is empty or has 0 length that is when this error occurs, but I wasn't able to replicate that either.

aperiodicchain commented 10 months ago

Hi @rristov60, sure please find my flow as json: Hope this helps

debug_s3.zip

trajche commented 10 months ago

Side note: @rristov60 If you need Minio instance for testing & dev I recommend using Stackhero - fast to setup and tear down when you don't need it.

My assumption is that maybe Minio requires the content-length as a parameter.

Capsicum42 commented 6 months ago

I have the same issue. I use Spaces from DigitalOcean which works fine with my other nodejs app. I want to create a file with the content "Hello World". I put "Hello World" in body and get this Error Message: "MissingContentLength: UnknownError"

Where can I set the content length ? Regards Holger

alexdohmen commented 6 months ago

https://github.com/minio/minio/issues/4152