kotrans v0.4.3
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.gitnpm
$ npm install kotransClient
<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);optionsserverObject. Must be an existing http/https ServerpathString. Default: '/'directoryString. Default:kotrans/uploads- Files will only be transferred to this 'allowed directory'
functionCallback
Thats it! Your server should be listening on your specified port and path.
Creating your client
var client = kotrans.client.createClient([options]);optionshostString. Default:localhostportNumber. Default:9000no_streamsNumber. Default: 2. The number of concurrent streams for data transfer.pathString. 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.
Fileis an event object given byevent.dataTransfer.files
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago