You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We would like to save images to MongoDB and want to encrypt the binary data field. And we are aware that the MongoDB object size limit is around 16MB (Stackoverflow info).
But even when the image only has 3.6MB I receive an error with file.save(): ERROR The value of "offset" is out of range. It must be >= 0 && <= 17825792. Received 17825794
Hi and sorry for the delay in responding to this. The issue at hand is that mfe does a JSON.stringify on a non-string field which then explodes in size for a Buffer.
I would highly recommend that you encrypt the files but store them somewhere else on a server and just save the encryption keys in Mongo.
We would like to save images to MongoDB and want to encrypt the binary data field. And we are aware that the MongoDB object size limit is around 16MB (Stackoverflow info).
But even when the image only has 3.6MB I receive an error with
file.save()
:ERROR The value of "offset" is out of range. It must be >= 0 && <= 17825792. Received 17825794
Is there a specific size limit when saving binary data from Buffer with mongoose-field-encryption?
The text was updated successfully, but these errors were encountered: