Comments (7)
Can you post client side too?
from socket.io-stream.
I'm using angularjs and a custom directive to get the file. But I've also tested with jQuery and the example you provide. In both cases the issue persits.
$('#file').change(function(e) {
var file = e.target.files[0];
var stream = ss.createStream();
// upload a file to the server.
ss(socket).emit('file', stream, {size: file.size});
ss.createBlobReadStream(file).pipe(stream);
});
Getting the file size and creating the stream works just fine. The 'file' event is emitted correctly as well, it's just that on the server side I'm not getting any data...
from socket.io-stream.
hmm, I tested the latest version again and it works good for me.
How did you load socket.io-stream on client side?
What kind of errors do you get actually?
Can you post dump of logs if possible ?
// show logs
DEBUG=socket.io-stream* node your-server.js
from socket.io-stream.
Thank you for your quick responses trying to help me! I've found my error: In angularjs, I set up a factory that was wrapping socket 'on' and 'emit' events in order to automatically inform the scope, this interfered with the streaming calls.
from socket.io-stream.
@cobaki I'm facing the same issue can you please explain me how it was resolved?
from socket.io-stream.
@fithwith be sure to create the stream ss(socket)
on the socket that was returned by io.connect(...)
and not the one returned by your factory function. I just stored a reference to the initial socket in my factory and used it anytime I had to create a stream.
from socket.io-stream.
@cobaki thank you for your quick reply, I did the same but I'm still facing the issue.
I'm using angularjs with the module ui.router, the first time I open the page where I can upload files its working fine, I can upload multiple files without problem, but once I visit another page (state because I'm using ui.router) and come back again to the upload page then the problem appear, I'm using the socket given by io.connect(), I emit the event, the data pass to the server, the stream also pass, but once the server try to call stream.pipe then the message pipe undefined appear.
I don't know if you have an idea from where it can come, its a little bit different than your case because I'm receiving the data and the stream correctly.
if you have an idea it wil be more than welcome :) thank you again @cobaki
from socket.io-stream.
Related Issues (20)
- Is this project still active? HOT 7
- Streaming to Android
- server > client HOT 1
- Simpler API
- MediaStream HOT 11
- Can you upload a folder?
- events.js:62 Uncaught Error: Uncaught, unspecified "error" event. (Authentication error) HOT 1
- Able to send/receive a native browser stream HOT 1
- An error when using Socket.io-stream with Electron.
- A port to other languages
- Stream interrupted file
- Uncaught TypeError: Cannot read property '_read' of null HOT 3
- Server dont recive emit or client dont emit HOT 3
- Send audio file from node.js server to another node.js server
- Client iOS
- This version of debug is vulnerable to ReDos attacks HOT 3
- In browser console getting error
- [Deprecation] SharedArrayBuffer
- add a settimeout to it to reduce cpu consumption
- Unfortunately there is no support for rooms and broadcasting for now.
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 socket.io-stream.