![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
node
gswwxyhk
这个作者很懒,什么都没留下…
展开
-
nodejs获取图片的宽高
分享一个npm包,用来获取image的宽高https://www.npmjs.com/package/image-sizear sizeOf = require('image-size');var dimensions = sizeOf('images/funny-cats.png');console.log(dimensions.width, dimensions.height);原创 2020-10-24 23:27:37 · 6967 阅读 · 0 评论 -
Nodejs作为客户端实现上传文件
使用needlenpm地址https://www.npmjs.com/package/needlevar needle = require('needle');var data = { file: '/home/johnlennon/walrus.png', content_type: 'image/png'}; // the callback is optional, and needle returns a `readableStream` object// that trigge原创 2020-10-24 23:22:03 · 977 阅读 · 0 评论