Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Image sharing on deployd

I've recently begun experimenting with Deployd. It is (kind of) similar to meteor.

This may be amateurish question, but what happens if my collection consists of images?

How will I upload it to MongoDB @ deployd dashboard?

like image 203
laycat Avatar asked Dec 11 '22 18:12

laycat


2 Answers

I created a module for deployd to upload files (images included).
https://github.com/NicolasRitouet/dpd-fileupload
It lets you store the files in a local folder and in a collection to query them.

like image 170
Nicolas RTT Avatar answered Jan 05 '23 00:01

Nicolas RTT


The only real way to use the Collection Resource Type to do this right now would be to base64 encode the image and store it as a string property. There are some limitations and performance issues with base64 images though. Alternatively, @dallonf has created an Amazon S3 resource to make it easy to integrate deployd apps with S3. http://docs.deployd.com/docs/using-modules/official/s3.md

There have been a lot of requests for storing binary files in collections, and hopefully someone (core committer or otherwise) can work on this after the forthcoming deployd release which includes significant improvements to the module API. This Github issue is worth watching: https://github.com/deployd/deployd/issues/106

like image 36
Jeff Cross Avatar answered Jan 04 '23 23:01

Jeff Cross