0.4.3 • Published 9 years ago

kotrans v0.4.3

Weekly downloads
1
License
BSD-2-Clause
Repository
github
Last release
9 years ago

kotrans

Browser-based file transfer system using binary.js as the client and node.js as the server.

###Due to how kotrans transfers very large files to the server, this module only works on applications that run under centOS/ubuntu and similar systems.

Download

Server

git

$ git clone git://github.com/CinnamonBagels/kotrans.git

npm

$ npm install kotrans

Client

<script src="path/to/binary.js"></script>
<script src="path/to/kotrans.client.js"></script>
  • kotrans.client.js is located in node_modules/kotrans/Client/
  • binary.js is located in node_modules/kotrans/node_modules/Binaryjs/dist/

How to use

Creating your server

var kotrans = require('kotrans');
kotrans.createServer([options], function);
  • options
    • server Object. Must be an existing http/https Server
    • path String. Default: '/'
    • directory String. Default: kotrans/uploads
      • Files will only be transferred to this 'allowed directory'
  • function Callback

Thats it! Your server should be listening on your specified port and path.

Creating your client

var client = kotrans.client.createClient([options]);
  • options
    • host String. Default: localhost
    • port Number. Default: 9000
    • no_streams Number. Default: 2. The number of concurrent streams for data transfer.
    • path String. Default: '/'. For routing purposes.

Sending files from client to server

kotrans.client.sendFile(file, callback);

Send a single File object to the Server's specified directory.

  • File is an event object given by event.dataTransfer.files
0.4.3

9 years ago

0.4.2

9 years ago

0.4.1

9 years ago

0.4.0

9 years ago

0.3.1

9 years ago

0.3.0

9 years ago

0.2.2

9 years ago

0.2.1

9 years ago

0.2.0

9 years ago

0.1.91

9 years ago

0.1.9

9 years ago

0.1.8

9 years ago

0.1.75

9 years ago

0.1.74

9 years ago

0.1.73

9 years ago

0.1.71

9 years ago

0.1.7

9 years ago

0.1.6

9 years ago

0.1.5

9 years ago

0.1.4

9 years ago

0.1.3

9 years ago

0.1.22

9 years ago

0.1.21

9 years ago

0.1.2

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago

0.0.9

9 years ago

0.0.8

9 years ago

0.0.7

9 years ago

0.0.6

9 years ago

0.0.5

9 years ago

0.0.4

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago