GithubHelp home page GithubHelp logo

Comments (6)

vote539 avatar vote539 commented on May 19, 2024

Hi,

What's your browser version and node version and platform?

from socketio-file-upload.

HiloCoder avatar HiloCoder commented on May 19, 2024

Hello,

Google Chrome vers. 35.0.1916.153 m
node v0.10.25
Windows XP


From: vote539 [email protected]
To: vote539/socketio-file-upload [email protected]
Cc: HiloCoder [email protected]
Sent: Monday, June 16, 2014 1:51 PM
Subject: Re: [socketio-file-upload] Unable to get file to transfer (#13)

Hi,

What's you're browser version and node version and platform?

On Jun 16, 2014, at 1:38 PM, HiloCoder [email protected] wrote:

I am trying to use socketio-file-upload from a context menu item click event. I am calling myinstance.prompt(), the dialog comes up, I select a file, hit Open. The server emits a "siofu_ready", then nothing else happens. The file is created in the specified server side dir but with 0 bytes. No errors in the console. Help would be appreciated.


Reply to this email directly or view it on GitHub.

Reply to this email directly or view it on GitHub.

from socketio-file-upload.

vote539 avatar vote539 commented on May 19, 2024

Are you running Node.JS on Windows XP, or is that just your desktop operating system? Windows XP may be kind-of quirky with Node.JS, especially with regards to file streams and such.

Can you try running the following script and see if it creates the file correctly? It should make "hello.txt" that contains "hello world". This uses the same under-the-hood mechanism for writing the file as socketio-file-upload.

var fs = require("fs");
var buf = new Buffer("aGVsbG8gd29ybGQNCg==", "base64");
var path = "hello.txt";

var stream = fs.createWriteStream(path, { mode: "0666" });

stream.on("open", function(){
    setTimeout(function(){
        stream.write(buf);
        stream.end();
    }, 100);
});

from socketio-file-upload.

HiloCoder avatar HiloCoder commented on May 19, 2024

Yes, running node js on Win XP for development and have had no problems.  I ran your script and it works correctly.


From: vote539 [email protected]
To: vote539/socketio-file-upload [email protected]
Cc: HiloCoder [email protected]
Sent: Monday, June 16, 2014 4:59 PM
Subject: Re: [socketio-file-upload] Unable to get file to transfer (#13)

Are you running Node.JS on Windows XP, or is that just your desktop operating system? Windows XP may be kind-of quirky with Node.JS, especially with regards to file streams and such.
Can you try running the following script and see if it creates the file correctly? It should make "hello.txt" that contains "hello world". This uses the same under-the-hood mechanism for writing the file as socketio-file-upload.
var fs = require("fs");
var buf = new Buffer("aGVsbG8gd29ybGQNCg==", "base64");
var path = "hello.txt"; var stream = fs.createWriteStream(path, { mode: "0666" }); stream.on("open", function(){ setTimeout(function(){ stream.write(buf); stream.end(); }, 100);
});

Reply to this email directly or view it on GitHub.

from socketio-file-upload.

vote539 avatar vote539 commented on May 19, 2024

Were you able to solve this issue?

You may also want to try the new useBuffer option in version 0.3 (which requires Socket.IO 1.0).

from socketio-file-upload.

HiloCoder avatar HiloCoder commented on May 19, 2024

No, I ended up using formidable.

from socketio-file-upload.

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.