Comments (15)
Sorry for huge delay, this is implemented in v1.5.1. Please, see piping docs
from meteor-files.
Could please explain what do you mean?
Cause video/audio streaming is supported.
And any file upload works like readStream
from meteor-files.
getStreamSomehow().pipe(streamOperation).pipe(Files)
basically, a way to pipe data to the file collection
from meteor-files.
On the client?
from meteor-files.
Yeah
from meteor-files.
Basically, a way to expose that stream, maybe a prepareInsert that returns the writable stream
from meteor-files.
Cold you please leave few use cases here?
from meteor-files.
on-the-fly encryption/media encoding is what i'm looking for
from meteor-files.
@NROL39 This is only place suitable for your requirements: https://github.com/VeliovGroup/Meteor-Files/blob/master/files.coffee#L707 , so we can add additional callback which will has arrayBuffer
or Uint8Array
as argument, but it will be just small chunk of whole file, are you sure you will be able to encode file by pieces?
Alternatively I can suggest separate modifier function which will take whole file and then return modified version this ready for upload, but will it be efficient?
from meteor-files.
Well, loading a 5GB file to memory and operating on it is not feasible on mobile/laptop/pretty-much-any-non-workstation-grade-computer, being able to pipe the data through a modifier function means you only need to hold the current chunk in memory.
from meteor-files.
@NROL39 this is what exactly I'm talking about. Please, confirm what it is possible to encode file - chunk by chunk, and encoder doesn't need the whole file.
from meteor-files.
it is, i've been using it for a while (although what im currently doing is streaming the file through the encoder then rebuilding the file from data chunks from it)
from meteor-files.
within this package? right?
If so, could you copy-paste here some code for further testing
from meteor-files.
using the filestream module for FileReadStream and FIleWriteStream
and a browserify'd version of node.js' crypto library for encryption
key = 'supersecretkey'
iv = 'supersecretiv'
cryptor = crypto.createCipher('aes-128-cbc', key, iv)
fstream = new FileReadStream(file)
fstream.pipe(cryptor).pipe(streamUploadFunction)
where file is a File object
and streamUploadFunction being a function that accepts UInt8Arrays and processes them for download (what we're missing), for now what i'm doing is piping the chunks to a new File object (basically rebuilding the file in memory
fstream.pipe(cryptor).pipe(new FileWriteStream).on('file',callbackFunction)
from meteor-files.
As @ghost is removed user, I close this issue
from meteor-files.
Related Issues (20)
- ENOENT: no such file or directory, mkdir HOT 18
- onBeforeUpload and other functions should be able to be asynchronous HOT 1
- Custom Endpoint for MinIO ? HOT 2
- What defines the filename of the saved file? HOT 2
- 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
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.