Replicate this error -
Create a zip file containing multiple files of different sizes which can come up to 10mb.
Store that file as in a document
something like:
name: "hello" - string
lifetime: 8943 - int
config_file: Binary('...', 0) - zip is stored as binary format
After uploading this and then using golang to marshal it into a struct:
by using a base64 decoder and then using ioutil.ReadAll this successfully decodes and returns a list of bytes (the zip file represented in bytes).
Issue:
Running this multiple times I've noticed it would fetch and decode successfully multiple times and rarely it would decode and report "unexpected EOF" error.
I've run my own mongo instances used a json file that adds the document to the collection and then used golang to read the document.
The json file is not changing it remains the same. Most of the time it works fine, and sometimes it fails.