image data storing from ionic to mongoDB

55 views
Skip to first unread message

krupa sharp

unread,
Jun 4, 2018, 4:59:52 AM6/4/18
to LoopbackJS
Hi,

   Currently i am working with loopback api to storing image data to mongoDB. i have googled  last five days. But still i am not got any idea.Can any one help ?

 Thank you

Uday Kumar

unread,
Jun 4, 2018, 7:09:32 AM6/4/18
to loopb...@googlegroups.com
Hi, 

 if you are using data and image one by one , you can look for  " loopback-component-storage"

or, you can pass the image data in body (as base64) and at server side convert base64 to desire image type





--
You received this message because you are subscribed to the Google Groups "LoopbackJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to loopbackjs+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/loopbackjs/5102259f-15dc-41a0-8152-2de548840869%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

krupa sharp

unread,
Jun 4, 2018, 7:37:32 AM6/4/18
to loopb...@googlegroups.com
Thanks uday, 

    
any specific documentation for implementing  'loopback-component-storage' ?

how the base64 handled in api ?
     

Regards,
R.Kirubhakaran

Uday Kumar

unread,
Jun 4, 2018, 8:23:03 AM6/4/18
to loopb...@googlegroups.com

Aman Alam

unread,
Jun 4, 2018, 1:34:05 PM6/4/18
to LoopbackJS
I strongly advice against storing base64 version of images into your mongodb.
Mainly for performance related reasons.
Imagine converting to and from base64 every time some client requests for the image. Your execution time will hit the roof.

You should use the Storage Component to accept files and store them somewhere on the disk, and then get the saved file's path on your server storage.
Then store that path in your mongodb.

Much faster and efficient use of resources.


On Monday, June 4, 2018 at 5:53:03 PM UTC+5:30, Uds214125 wrote:
On Mon, Jun 4, 2018 at 5:07 PM, krupa sharp <krupa...@gmail.com> wrote:
Thanks uday, 

    
any specific documentation for implementing  'loopback-component-storage' ?

how the base64 handled in api ?
     

Regards,
R.Kirubhakaran

On Mon, Jun 4, 2018 at 4:39 PM, Uday Kumar <uday....@pickcel.com> wrote:
Hi, 

 if you are using data and image one by one , you can look for  " loopback-component-storage"

or, you can pass the image data in body (as base64) and at server side convert base64 to desire image type




On Mon, Jun 4, 2018 at 2:29 PM, krupa sharp <krupa...@gmail.com> wrote:
Hi,

   Currently i am working with loopback api to storing image data to mongoDB. i have googled  last five days. But still i am not got any idea.Can any one help ?

 Thank you

--
You received this message because you are subscribed to the Google Groups "LoopbackJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to loopbackjs+...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "LoopbackJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to loopbackjs+...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "LoopbackJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to loopbackjs+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages