'Store image with redis - cli?
i'm new to redis and learning how to use it. I have and exercise require create a shopping cart redis db using client id as key and store image using commands. I've research on redis commands site and others but only find ways to do the task using python or nodejs. Can any one show me some example doing it with commands?. Thanks
Solution 1:[1]
cat spam_comments.png | redis-cli -x set spam_comments.png
redis-cli get spam_comments.png > /tmp/img.png
$ redis-cli get spam_comments.png > /tmp/img.png
$ file img.png
img.png: PNG image data, 392 x 66, 8-bit/color RGB, non-interlaced
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | namizaru |
