Closed Moebits closed 2 years ago
Also, this library makes a lot of LIST requests, which is limited to 2000/mo on the AWS free tier... I hit the free tier limit in a few days and I suspect it was because of this library.
I figured out that all I needed to do is run s3.getObject() on each endpoint and send it to the client, so I will no longer be using this library.
I am getting an error when an object is named something that contains non-ascii characters, like
無題.jpg
:TypeError [ERR_INVALID_CHAR]: Invalid character in header content ["x-4front-s3-proxy-key"]
I have found the offending line in your code:
res.setHeader
doesn't support non-ascii characters, so you need to strip all non-ascii characters from the key or wrap this in a try/catch block. I don't really understand what the point of writing this header is, I will be forking this project with the line removed since this seems to be unmaintained for the most part.