Firebase Error: First Argument Has A Key Path Longer Than 768 Bytes
I am trying to save an image of a canvas to my firebase database. But when I try to save it I get the following error. Uncaught Error: Reference.set failed: First argument has a k
Solution 1:
A common way to shorten the string and keep it reasonably unique is to use its hash. You could use a simple numeric hash, an MD5 hash or one of the many other hashes.
Just keep in mind that the shorter the hash, the bigger the chances are of two strings mapping to the same hash value. So you'll want to use a hash that is reasonably long, to prevent such collisions.
Post a Comment for "Firebase Error: First Argument Has A Key Path Longer Than 768 Bytes"