Comments (15)
@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.
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 workerevent-emitter.js
- NodeJS-like events on clientfiles.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.
BTW why not use: https://github.com/hharnisc/react-native-meteor ?
from meteor-files.
@faavictoriano any news on your end?
from meteor-files.
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.
@faavictoriano thank you for reply, let me know then.
from meteor-files.
@faavictoriano any news on your end?
from meteor-files.
This issue will be closed on next week, due to issue starter silence. I assume it as fixed.
from meteor-files.
I fixed i pass video and audio using DATA URI and BLOB.. thanks
from meteor-files.
@faavictoriano are you can send example to here ?
from meteor-files.
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.
@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.
@gauravdhiman can react-native-image-crop-picker
return Base64 encoded string?
from meteor-files.
@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.
@gauravdhiman you can find everything you need in wiki:
- Upload as base64
- Upload as File Instance Blob (or Uint Array) can be easily converted to File
- GridFS Integration
Let me know if this helped you
from meteor-files.
Related Issues (20)
- Async support HOT 23
- [FilesCollection.ServiceFile] Path "/assets/app/uploads/ServiceFileCollection" is not writable! HOT 2
- How to change item metadata before it is inserted into the collection? HOT 9
- How do I update a filesCollection after Server side Write created? HOT 1
- Get user ip on upload HOT 9
- Since Meteor 2.11 - Exception in setTimeout callback: TypeError: fs.remove is not a function HOT 9
- Question: Can you store directly in GridFS? HOT 2
- Question: Save link in database?
- Update aws-sdk to v3 in 'Use AWS:S3 As Storage' Documentation HOT 4
- Files.load -> options.fileName is not in filepath HOT 2
- FilesCollection.find(...).each() not working properly? HOT 1
- HTTP uploads not working, multi-instance/cluster environment NGINX balanced HOT 5
- onAfterUpload not throwing error in uploader.on('end') HOT 5
- Cannot stream a video with filenames longer than 80 characters HOT 1
- wrong custom error message when using HTTP
- Make Meteor-Files compatible with meteor-desktop? HOT 4
- Uncaught error when uploading an empty file
- Help Wanted: Method '_FilesCollectionAbort_attachments' not found [404] HOT 1
- Match error: Unknown key in field HOT 5
- User can not be determined in protected callback in Firefox HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from meteor-files.