I am getting started and could not find anything or anything that i understand on uploading POST submitted image in Meteor, is it supported right out of the box, if not how do i handle it?
我正在开始,在Meteor中上传POST提交的图像时找不到任何我理解的内容或任何内容,是否支持开箱即用,如果不是我如何处理它?
So Far Manage to break it down as:
所以尽管如此:将其分解为:
- I need to make Server side Route to handle POST request (Not solid Idea on where to look for it)
-
I need to use some kind of middleware for accepting POST Data (File/Image) [No Idea how to do it or where to look to learn it]
我需要使用某种中间件来接受POST数据(文件/图像)[不知道怎么做或者在哪里学习它]
-
Integrate Image Upload Meteor Package with that received Data and Upload the Image [with little playing around may be i can do it]
将图像上传流星包与所接收的数据集成并上传图像[很少玩,我可以做到]
我需要使用服务器端路由来处理POST请求(不知道在哪里查找它)
SO my question is how do i do, Step 1, 2 and 3, where do i have to look into? If its the bad approach, please suggest me a good one.
所以我的问题是我该怎么做,第1,2和3步,我在哪里需要研究?如果是坏方法,请建议我一个好的方法。
Update
The reason I need to handle POST on my own is because i needed to upload images that are send by WYSIWYG text editors, many of them send the inline Images via POST url. Meteor-CollectionFS cannot be used with POST and I couldn't figure out how to integrate Meteor Upload with mapped POST URL and send the data to Meteor Upload for insert after receiving the file object at server.
我需要自己处理POST的原因是因为我需要上传由WYSIWYG文本编辑器发送的图像,其中许多人通过POST URL发送内联图像。 Meteor-CollectionFS不能与POST一起使用,我无法弄清楚如何将Meteor Upload与映射的POST URL集成,并在收到服务器上的文件对象后将数据发送到Meteor Upload进行插入。
1 个解决方案
#1
Technically speaking you more or less have the idea of what you need to do. However, implementing image upload has a lot of nuances that will a) teach you quite a bit if you do decide to implement it on your own and b) will be a pain to implement yourself.
从技术上讲,你或多或少都知道你需要做什么。然而,实现图像上传有很多细微差别,a)如果你决定自己实现它,那么教你很多,b)实现自己很痛苦。
If all you want is a pretty robust, scalable, and customizable image upload solution I would suggest:
如果你想要的是一个非常强大,可扩展,可定制的图像上传解决方案,我建议:
https://github.com/tomitrescak/meteor-uploads
It is build on top of the jquery file uploader, which is a very successful, maintained, and easy to use upload project. Alternatively, if you would like to upload to a Mongo GridFS you might want to look at:
它构建在jquery文件上传器之上,这是一个非常成功,维护且易于使用的上传项目。或者,如果您想上传到Mongo GridFS,您可能需要查看:
https://github.com/CollectionFS/Meteor-CollectionFS
Both solutions are good but they each take a different approach to the problem. Each work pretty much out of the box but give plenty of room for configurability.
两种解决方案都很好,但它们各自采用不同的方法解决问题。每个工作都开箱即用,但为可配置性提供了充足的空间。
#1
Technically speaking you more or less have the idea of what you need to do. However, implementing image upload has a lot of nuances that will a) teach you quite a bit if you do decide to implement it on your own and b) will be a pain to implement yourself.
从技术上讲,你或多或少都知道你需要做什么。然而,实现图像上传有很多细微差别,a)如果你决定自己实现它,那么教你很多,b)实现自己很痛苦。
If all you want is a pretty robust, scalable, and customizable image upload solution I would suggest:
如果你想要的是一个非常强大,可扩展,可定制的图像上传解决方案,我建议:
https://github.com/tomitrescak/meteor-uploads
It is build on top of the jquery file uploader, which is a very successful, maintained, and easy to use upload project. Alternatively, if you would like to upload to a Mongo GridFS you might want to look at:
它构建在jquery文件上传器之上,这是一个非常成功,维护且易于使用的上传项目。或者,如果您想上传到Mongo GridFS,您可能需要查看:
https://github.com/CollectionFS/Meteor-CollectionFS
Both solutions are good but they each take a different approach to the problem. Each work pretty much out of the box but give plenty of room for configurability.
两种解决方案都很好,但它们各自采用不同的方法解决问题。每个工作都开箱即用,但为可配置性提供了充足的空间。