ofpay / nimg Goto Github PK
View Code? Open in Web Editor NEWa high performance image storage and processing module written by nodejs
License: Apache License 2.0
a high performance image storage and processing module written by nodejs
License: Apache License 2.0
我在nodejs 6.9.5环境下启动正常,上传文件就报这个错误
at Buffer.write (buffer.js:732:11)
at MultipartParser.initWithBoundary (/opt/nimg-master/node_modules/formidable/lib/multipart_parser.js:61:17)
at IncomingForm._initMultipart (/opt/nimg-master/node_modules/formidable/lib/incoming_form.js:308:10)
at IncomingForm._parseContentType (/opt/nimg-master/node_modules/formidable/lib/incoming_form.js:250:12)
at IncomingForm.writeHeaders (/opt/nimg-master/node_modules/formidable/lib/incoming_form.js:129:8)
at IncomingForm.parse (/opt/nimg-master/node_modules/formidable/lib/incoming_form.js:97:8)
at /opt/nimg-master/node_modules/connect/lib/middleware/multipart.js:125:12
at noop (/opt/nimg-master/node_modules/connect/lib/middleware/multipart.js:22:3)
at multipart (/opt/nimg-master/node_modules/connect/lib/middleware/multipart.js:76:5)
at /opt/nimg-master/node_modules/connect/lib/middleware/bodyParser.js:57:9
<script type="text/javascript">
$(function () {
//$('#form1').submit(function() {
// $.post("http://192.168.1.23/01/upload", function(data) {
// alert(data);
// });
// return false;
//});
var options = {
//dataType: 'json',
success: function (data) {
//$("#responseText").text(data);
alert(data);
}
};
// ajaxForm
$("#form1").ajaxForm(options);
});
</script>
<form id="form1" enctype="multipart/form-data" action="http://192.168.1.23/01/upload" method="post">
Choose file:<input name="userfile" type="file">
<input type="submit" value="upload">
</form>
如题,我本地有大量的图片,大约5-7T,有什么方式能够快速导入,而不用重新上传一遍吗?
Hi Yongcheng,
我是Xinyuan, 关于Nimg我有一个问题想请教一下:
在zimg的文档里面(http://zimg.buaa.us/arch_design.html)里面,提到了这样一段话
除了路径规划,zimg另一大功能就是压缩图片。从用户角度来说,zimg返回来的图片只要看起来跟原图差不多就行了,如果确实需要原图,也可以通过将所有参数置空的方式来获得。基于这样的条件,zimg.c对于所有转换的图片都进行了压缩,压缩之后肉眼几乎无法分辨,但是体积将减少67.05%。具体的处理方式为:
图片裁剪时使用LanczosFilter滤镜;
以75%的压缩率进行压缩;
去除图片的Exif信息;
转换为JPEG格式。
经过这样的处理之后可以很大程度的减少流量,实现设计目标。
我想问一下,Nimg有这样的实现吗?
你好:
userpath用户目录 是指什么?
Cannot GET /test/2222.jpg/info
端口也打开了
Thu Aug 17 2017 15:46:42 GMT+0800 (CST):server listening:9000
^[[90mGET /23/tsize ^[[33m404 ^[[90m11ms^[[0m
^[[90mGET /23.jpg ^[[33m404 ^[[90m2ms^[[0m
^[[90mGET /nimg/test/tsize ^[[33m404 ^[[90m2ms^[[0m
Thu Aug 17 2017 15:55:29 GMT+0800 (CST):server listening:9000
^[[90mGET /nimg/test/tsize ^[[33m404 ^[[90m14ms^[[0m
Thu Aug 17 2017 15:57:46 GMT+0800 (CST):server listening:9000
^[[90mGET /test ^[[33m404 ^[[90m13ms^[[0m
Thu Aug 17 2017 15:57:46 GMT+0800 (CST):server listening:9000
^[[90mGET /nimg/test/tsize ^[[33m404 ^[[90m13ms^[[0m
^[[90mGET /nimg/test/tsize ^[[33m404 ^[[90m3ms^[[0m
^[[90mGET /nimg/test/tsize ^[[33m404 ^[[90m1ms^[[0m
^[[90mGET /test/act=tsize ^[[33m404 ^[[90m1ms^[[0m
^[[90mGET /test/act=tsize ^[[33m404 ^[[90m1ms^[[0m
^[[90mGET /test/act=tsize ^[[33m404 ^[[90m0ms^[[0m
^[[90mGET /test/act=tsize ^[[33m404 ^[[90m1ms^[[0m
^[[90mGET /test/tsize ^[[33m404 ^[[90m1ms^[[0m
^[[90mGET /test/tsize ^[[33m404 ^[[90m2ms^[[0m
^[[90mGET /test/tsize ^[[33m404 ^[[90m1ms^[[0m
^[[90mGET /test/tsize ^[[33m404 ^[[90m0ms^[[0m
^[[90mGET /test/tsize ^[[33m404 ^[[90m1ms^[[0m
^[[90mGET /test/tsize ^[[33m404 ^[[90m1ms^[[0m
~
如题
在文件系统里面存储文件的时候就是用的_
500 Error: Buffer.write(string, encoding, offset[, length]) is no longer supported
at Buffer.write (buffer.js:753:11)
at MultipartParser.initWithBoundary (/home/img/nimg-master/node_modules/connect/node_modules/formidable/lib/multipart_parser.js:61:17)
at IncomingForm._initMultipart (/home/img/nimg-master/node_modules/connect/node_modules/formidable/lib/incoming_form.js:308:10)
at IncomingForm._parseContentType (/home/img/nimg-master/node_modules/connect/node_modules/formidable/lib/incoming_form.js:250:12)
at IncomingForm.writeHeaders (/home/img/nimg-master/node_modules/connect/node_modules/formidable/lib/incoming_form.js:129:8)
at IncomingForm.parse (/home/img/nimg-master/node_modules/connect/node_modules/formidable/lib/incoming_form.js:97:8)
at /home/img/nimg-master/node_modules/connect/lib/middleware/multipart.js:125:12
at noop (/home/img/nimg-master/node_modules/connect/lib/middleware/multipart.js:22:3)
at multipart (/home/img/nimg-master/node_modules/connect/lib/middleware/multipart.js:76:5)
at /home/img/nimg-master/node_modules/connect/lib/middleware/bodyParser.js:57:9
nodejs v7.6.0
npm 4.1.2
Version: ImageMagick 7.0.5-0 Q16
Python 2.6.6
How can I fix it, can you tell me,please.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.