Comments (15)
- There is only IP access control in zimg now. If you need user verify funtion, you should modify post_request_cb() in zhttpd.c. But it's not easy.
- Changing file name is not a good idea because you need to modify both save_img() and get_img() funtions. The naming rules are in code. Ensure you won't miss anything about them.
from zimg.
- for ssdb storage, is it using set or hset? can we modify this setting?
- md5 naming will not have collision? i would like to put timestamp into the filenaming... for easier sorting
from zimg.
Can you please provide the server spec for this website:
http://demo.buaa.us/
CPU, memory usage will do.
thanks.
from zimg.
- There is only IP access control in zimg now. If you need user verify funtion, you should modify post_request_cb() in zhttpd.c. But it's not easy.
is there any update in future for this function? zimg will get huge following and adoption if u can just implement those two features... 1, allow verification and api sending back response (header) modification 2, allow filename to be modified
great work by the way! thanks for the feedback.
from zimg.
Is it possible to provide a script API call from php to frontend to zimg server for the uploading process?
e.g. zimg command line update or similar. This will open up a lot of options for people to use zimg
from zimg.
- There is only IP access control in zimg now. If you need user verify funtion, you should modify post_request_cb() in zhttpd.c. But it's not easy.
is there anyways to make it easy with some integration with php api or something?
from zimg.
Zimg doesn't store users' data. Users' data is in your MySQL or other databases. How can I verify users without their data? Authenticate users in PHP first and then get images from zimg. Please think it over before asking.
from zimg.
I mean only allow authenticated users to upload data. retrieval is fine.
from zimg.
I will try to implement a simple authentication in lua script.
from zimg.
sounds great. node.js will be even better though.
from zimg.
How to use the zimg api to upload images , I mean How to use php get the json result ?
from zimg.
For me, authentication is best done with php before upload. However, it would be really helpful if filename could be set while uploading using curl. Using only an MD5 hash that I as a programmer has no insight into is bad practice, and would lock me into zimg. A much better solution would be if I can use e.g. this to upload a file and save as myfilname.jpg:
curl -F "[email protected];type=image/jpeg" "http://127.0.0.1:4869/upload?fn=myfilname.jpg"
And to download file by stating filename instead of md5, one could use perhaps:
http://127.0.0.1:4869/?fn=myfilename.jpg
If you must keep MD5, then this could also work just as before:
http://127.0.0.1:4869/[md5string]
That way everyone can use it as they like!
I'm also curious, if you save on local hdd, is processed image (e.g. resized) then still cached in local memory, so that the processing part only needs to happen once within a given time-window? Ideally, I would like to save files to a hard drive for more permanent storage, but I don't want the processing to happen on reoccurring requests. Also, I'm assuming that a local drive might as well be a remote drive mounted locally? That way you can use Gluster (http://www.gluster.org/) as a distributed storage.
Also, I have a concern regarding prevention of DDoS / overload-attacks. Since Zimg is loaded directly, I cannot do normal checks using nginx or php against e.g. ip address or session. So it would be really helpful if Zimg would have some features to handle this.
So, in summary:
Question 1: Any chance you could implement this naming-feature?
Question 2: Is caching being done when using local hdd as storage?
Question 3: Any way of preventing DDoS / overload-attacks? If not, any plans for implementing this?
Question 4: In terms of long-term maintainability, are you planning to maintain zimg for many years to come?
Best regards
from zimg.
@Niklas81 Thanks for you suggestions.
- The naming-feature depends on a map between MD5 and expect-name. I should use some way to store the map when POST images and query it before GET images which costs high latency. In fact, if you use zimg, you should store some related information like user name, password and any other data in the database. You can store the map of filename by the way. So, zimg will not support this feature.
- There is a memcached as cache in front of the hdd storage.
- Now zimg has no solution of preventing attacks. You can use zimg behind a nginx to achieve this target.
- I will maintain zimg until the new version of my image storage and processing system release. Which have most of features of zimg and is in developing.
from zimg.
@QSWL
using php-curl to post image to zimg: #45 and #97
from zimg.
@buaazp I like zimg so much, i release an opensource library for it for php soon
from zimg.
Related Issues (20)
- zimg/src/zdb.c:23:10: fatal error: 'wand/magick_wand.h' file not found
- 有人试过用python上传图片吗?
- 编译失败:Could NOT find LibEventPthreads;Could NOT find LibEventOpenssl HOT 1
- Java操作Zimg返回json数据格式
- 如何返回base64的图片格式?
- 图片显示不完整
- 官网文档里的很多链接都失效了,辛苦维护一下吧
- 怎么删除图片呢 HOT 1
- zimg 进程异常退出,提示内存越界 HOT 2
- how zimg restart after change config?
- PNG image uploaded successfully, but cannot be accessed HOT 1
- 官方文档wget libevent安装cloud.github.com域名无法解析问题
- 各位大佬 能不能把小视频也集成进来?支持图片和视频 HOT 1
- info 接口获取图片信息很慢,请问可以通过什么参数做优化吗 HOT 1
- 基于centos 8.0 及以上 安装 有问题
- make error HOT 2
- 出现大量 Error from accept() call: Too many open files 错误 HOT 1
- [Building error]: /usr/bin/ld: CMakeFiles/zimg.dir/zaccess.c.o:(.bss+0x0): multiple definition of `settings'; CMakeFiles/zimg.dir/main.c.o:(.bss+0x20): first defined here HOT 2
- make error HOT 1
- 请问zimg硬盘写满了会怎么办,会删除历史数据吗 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zimg.