Coder
Coder

Reputation: 97

Getting images from my Parse database in javascript?

I have images stored in a parse database under the column image.

Using a query and the .get("image") command, I can get an [OBJECT object] type of thing returning in the js.

So how do I use this object to actually show the image?

image.getUrl() tells me .getUrl() isn't a function so I guess it isn't that

Upvotes: 3

Views: 129

Answers (2)

jjbskir
jjbskir

Reputation: 10627

The best practice for getting a Parse a file or image is here in the documentation.

object.get("image").url()

Hope this helps!

Upvotes: 1

Vikas Kad
Vikas Kad

Reputation: 1021

Basically if you see your return image object and stringify it you will get all details about image.

so the image URL is

image._url

Upvotes: 1

Related Questions