LiveQuery object creation + Saving an object through Parse.File

in #utopian-io6 years ago

image.png

Another issue that took me several hours to solve during my work was how to save the files by directly using the FileAdapter from Parse-Server.

Most of questions regarding this process are simply answered by "Don t use it, use Amazon S3 instead". Well, I was not given this choice by my employer so I had to find a way around it.

I've added a testFiles.js script that shows how to save a File in Parse (there are a small video and a SteemPlus png logo included for test) in this commit and updated the README in this one for more clarity regarding how to process.

How to use it?


First please read the first contribution on this topic, that will show you how to test the LiveQuery feature with your Parse-server.

Make sure you ve set up all the keys to match those on your deployed Parse-Server.
And test it!

lq.gif

So if you followed the GIF:

  • In a first terminal I run node main.js to start listening for LiveQueries
  • We see Connection Opened, so we are really listening for the queries
  • In a second terminal I run node testFiles.js.
  • It succesfully uploads the file to the Server, so the script is happy and shows "Youhou"
  • It sends the new object to the Parse Server
  • Back on the first terminal, we can see that while listening to the LiveQueries, the script detected that a new object was created.

Hope this will help those on my situation, I saw I was not the only one struggling with this!

@stoodkev



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Thank you for the contribution. It has been approved.

You can contact us on Discord.
[utopian-moderator]

It's great to be able to read your post again, I'm very interested in your quote, from what I read above, I understand, you improve this feature. But at the end of the last sentence, this is a special sentence for me, you say you are not the only one trying. You are not arrogant with a job that only one or a few people can do. @stoodkev

Just doing my best to help the community =)

If so! this work becomes very noble @stoodkev

Hey @stoodkev I am @utopian-io. I have just upvoted you!

Achievements

  • Seems like you contribute quite often. AMAZING!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x

Coin Marketplace

STEEM 0.26
TRX 0.11
JST 0.033
BTC 63851.10
ETH 3059.36
USDT 1.00
SBD 3.85