meteorjs 图片上传/转换 [英] meteorjs image upload / conversion

查看:28
本文介绍了meteorjs 图片上传/转换的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要将文件上传到meteor,对其进行一些图像处理(必要时进行图像转换,从图像生成缩略图),然后将其存储在外部图像存储服务器中(s3).这应该尽可能快.您对 nodejs 图像处理库有什么建议吗?还有我如何将文件上传到meteorjs?

I need to upload a file to meteor, do some image manipulation on it (image conversion if necessary, generate thumbnail from image ) and then store it in an external image storage server (s3). This should be as fast as possible. Do you have any recommendations for a nodejs image processing library ? also how i can upload a file to meteorjs ?

谢谢

推荐答案

我最终得到了以下解决方案:

I ended up with the following solution:

1) 自定义上传 url 的流星服务器端路由

1) meteor server side route for a custom upload url

__meteor_bootstrap__.app.stack.splice (0, 0, {
    route: '/upload',
    handle: function (req,res, next) {
        //handle upload
    }.future ()
});

2) 在文件上传函数中使用强大的 nodejs 模块

2) use formidable nodejs module inside the function for file upload

这篇关于meteorjs 图片上传/转换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆