I am using a web service to get some images dynamically generated and sent to my app. The problem is the file names tend to get super long based on all of the parameters I use to generate the images. Now I am running into situations where all of the parameters lead to names longer than 255 characters.
So I need a way to shorten them and also make sure they stay unique, similar to what bit.ly does but I need it accomplished on the device. As long as the final names are less than 255 characters I am good.
Not sure of how to accomplish this.
When you have a lot of data, and you want to fingerprint it, or get some unique value back =
hash.You can sha1 or md5 your filename, and don’t worry about collisions unless you are building a nuclear powerplant, or going to crash a rover on mars.
That or a lookup with a guid or incrementing number.