zimg
zimg copied to clipboard
A lightweight and high performance image storage and processing system.
使用raw-post 方式上传数据时,content-type 需要设置为allowed_type 允许的值。 但allowed_type不是标准的mime type ,在使用某些内置类型检查的服务器端语言(例如c#)构造http请求上传图片时会造成一些困扰。 是否可以考虑将此allowed_type 规定为mime-type?
现在的测试的列子都是用表单提交上去的,返回的是一个页面。从页面上取得MD5的值很麻烦! 网络上看到作者这句话: “对编程更加方便的上传方式是HTTP RAW POST而非HTTP form POST,因此你将可以使用更加轻松的HTTP POST库来完成上传操作,在此我将使用curl来进行演示:curl -H "Content-Type:jpeg" --data-binary @testup.jpeg "http://127.0.0.1:4869/upload"”。 搜索了都是php实现的,请问这种Json格式具体是怎么实现的? "{"ret":true,"info":{"md5":"5f189d8ec57f5a5a0d3dcba47fa797e2","size":29615}}" 我现在只能后台去拿到Md5的值(java),不知道前台可以直接上传拿到这段Json嘛?例如使用javaScript?
1、zcommon.h 在settings数据结构里增加 ssdb_passwd,ssdb_index成员属性; 2、main.c settings.init初始化ssdb_passwd,ssdb_index;load_conf读取配置赋值到ssdb_passwd,ssdb_index;增加createRedisContext方法;替换两处调用redisConnect为createRedisContext; 3、zimg.lua 增加 ssdb_passwd,ssdb_index 两项配置;
原来的zimg采用本地存储的方式,随着文件数量的增加(现有图片约50G),后期想迁移到redis中。请问怎么把之前本地存储的图片导入到redis?
/bin/sh: 1: autoreconf:not found /bin/sh: 1: ./configure :not found make[1]:Entering directory 'home/zimg/deps/libjpeg-turbo' make[1]:**** No targets specified and no makefile found.stop Leaving directory 'home/zimg/deps/libjpeg-turbo' Makefile:30:recipe for target 'deps/libjpeg-turbo/.libs/libjpeg.a' failed. make:*** [deps/libjpeg-turbo/.libs/libjpeg.a]...
假如另外搞个数据库来模拟图片的话 感觉不是很靠谱。。。比如zimg已经删了某个图片 但是我的数据库中仍然有这个图片的MD5 出现这种数据不同步 感觉太尴尬
https://natmchugh.blogspot.com/2015/02/create-your-own-md5-collisions.html anyways not to overwrite the original file when have collision?
can get it back up?
执行: `curl -H "Content-Type:jpeg" --data-binary @test.php "http://127.0.0.1:4869/upload"` 结果: `{"ret":true,"info":{"md5":"9ec24c8d5d2c6c1c9910f784fdbb2766","size":24}}`