Code Monkey home page Code Monkey logo

Comments (15)

gauravdhiman avatar gauravdhiman commented on May 18, 2024 2

@faavictoriano, can you share your code to see how you achieved upoading files to Meteor from React-Native.

I am using react-native-meteor for integration between React-Native and Meteor but looks like it's CollectionFS capability is deprecated and is discouraged to be used.

A sample code of how you achieved file upload (both using base64 and and Data URI) will really be helpful.

from meteor-files.

dr-dimitru avatar dr-dimitru commented on May 18, 2024

I guess you can grab code of this lib, and copy/paste Client's part. As it's still JavaScript - it should work.
Deps (on client):

  • underscore
  • reactive-var (can be removed)
  • tracker (can be removed)
  • More info here

Files:

  • worker.js - The main worker
  • event-emitter.js - NodeJS-like events on client
  • files.coffee - The main file, it's well-documented so you can easily identify if it's client or server part (see @locus)

Not easy task, but if you have enough experience it won't take a lot of time.

from meteor-files.

dr-dimitru avatar dr-dimitru commented on May 18, 2024

BTW why not use: https://github.com/hharnisc/react-native-meteor ?

from meteor-files.

dr-dimitru avatar dr-dimitru commented on May 18, 2024

@faavictoriano any news on your end?

from meteor-files.

faavictoriano avatar faavictoriano commented on May 18, 2024

I will try this.. Thank you.. :) we are using ddp for connection.. And i
guess we can use react native for.meteor. actually we are using this before
On May 19, 2016 12:29 AM, "dr.dimitru" [email protected] wrote:

@faavictoriano https://github.com/faavictoriano any news on your end?


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#74 (comment)

from meteor-files.

dr-dimitru avatar dr-dimitru commented on May 18, 2024

@faavictoriano thank you for reply, let me know then.

from meteor-files.

dr-dimitru avatar dr-dimitru commented on May 18, 2024

@faavictoriano any news on your end?

from meteor-files.

dr-dimitru avatar dr-dimitru commented on May 18, 2024

This issue will be closed on next week, due to issue starter silence. I assume it as fixed.

from meteor-files.

faavictoriano avatar faavictoriano commented on May 18, 2024

I fixed i pass video and audio using DATA URI and BLOB.. thanks

from meteor-files.

noris666 avatar noris666 commented on May 18, 2024

@faavictoriano are you can send example to here ?

from meteor-files.

dr-dimitru avatar dr-dimitru commented on May 18, 2024

both using base64 and and Data URI

base64 and Data URI is the almost same thing, Data URI has mime-type prepended to the data.

@gauravdhiman can you get an event when user selects the file? Something like in input[type="file"]?? Sorry not familiar with react-native

from meteor-files.

gauravdhiman avatar gauravdhiman commented on May 18, 2024

@dr-dimitru, yes I can get file object whenever user selects file(s). I am planning to use, react-native-image-crop-picker react component for this.

Once I get the file object, how to upload it to Meteor or 3rd party cloud APIs ? I would prefer Meteor.

from meteor-files.

dr-dimitru avatar dr-dimitru commented on May 18, 2024

@gauravdhiman can react-native-image-crop-picker return Base64 encoded string?

from meteor-files.

gauravdhiman avatar gauravdhiman commented on May 18, 2024

@dr-dimitru, that I can convert on the fly.

Anyway more preferred way is to send binary data (image) and not converting it to base64. Send binary to Meteor and binary in Mongo GridFS. If that is not possible, I am ok with base64 in that case.

Please share the sample code, if possible.

from meteor-files.

dr-dimitru avatar dr-dimitru commented on May 18, 2024

@gauravdhiman you can find everything you need in wiki:

Let me know if this helped you

from meteor-files.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.