0.6.3 • Published 2 years ago

kubos-file-client v0.6.3

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
2 years ago

kubos-file-client

This is a Node.js utility intended to work with the KubOS file transfer protocol.

How to use it

Uplinking a file

const { uplink } = require('kubos-file-client');
// Get a Node.js stream as an uplink destination:
const MyUplink = new SatUplinkSocket();
const myFilePath = '/usr/some/file/path.txt';

uplink(myFilePath, MyUplink)
	.then(() => {
		console.log(`finished uplinking ${myFilePath}`);
	})
	.catch(err => {
		console.log(`there was an error uplinking ${myFilePath}`);
		console.error(err);
	});

Downlinking a file

const { downlink } = require('kubos-file-client');
const MyDownlink = new SatDownlinkSocket();
const destinationPath = '/usr/home/local/destination/filepath.txt';
const targetLocation = '/remote/location/filepath.txt';
const uniqueId = getUniqueId();

downlink(uniqueId, destinationPath, targetLocation, MyDownlink)
	.then(filePath => {
		console.log(`file has been downlinked to ${filePath}`);
	})
	.catch(err => {
		console.log(`there was an error uplinking ${filePath}`);
		console.error(err);
	});
//
0.6.3

2 years ago

0.6.2

2 years ago

0.6.1

2 years ago

0.6.0

2 years ago

0.5.4

2 years ago

0.5.3

3 years ago

0.5.2

3 years ago

0.5.1

3 years ago

0.5.0

3 years ago

0.4.2

3 years ago

0.4.1

3 years ago

0.4.0

3 years ago

0.3.4

3 years ago

0.3.3

3 years ago

0.3.2

3 years ago

0.3.1

3 years ago

0.3.0

3 years ago

0.2.6

3 years ago

0.2.5

3 years ago

0.2.4

3 years ago

0.2.3

3 years ago

0.2.2

3 years ago

0.2.1

3 years ago

0.2.0

3 years ago

0.1.0

3 years ago