Release Notes 01/09/2018
Release Notes 01/09/2018

Supported CLI commands

./storj get-bucket-id <bucket-name>

Example:
./storj get-bucket-id testbucket
ID: 6cb2014a988adca6ed712577 	Decrypted: true 	Created: 2018-01-04T16:55:29.832Z 	Name: testbucket

./storj upload-file <bucket-name> <path-to-local-file-name>

Example:
./storj upload-file testbucket3 uploader.lo
ID: 965efd4b5d65fd82643f5727 	Decrypted: true 	Created: 2017-12-18T18:14:05.098Z 	Name: testbucket3
[======================================================================] 100.00%
Upload Success! File ID: b8c4543226e9c65f61aa0141

./storj download-file <bucket-name> <file-name> <path-to-local-file-name>

Example: Local file name not given
./storj download-file testbucket3 uploader.o /tmp/.
ID: 965efd4b5d65fd82643f5727 	Decrypted: true 	Created: 2017-12-18T18:14:05.098Z 	Name: testbucket3
stat: No such file or directory
Warning: File already exists at path [/tmp/.].
Would you like to overwrite [/tmp/.]: [y/n] y
Unable to open /tmp/.: Is a directory

Example: Local file name given
./storj download-file testbucket3 uploader.o /tmp/uploader.ks
ID: 965efd4b5d65fd82643f5727 	Decrypted: true 	Created: 2017-12-18T18:14:05.098Z 	Name: testbucket3
[======================================================================] 100.00%
Download Success!

Example: Downloading with a filename that already exists locally
./storj download-file testbucket3 uploader.o /tmp/uploader.ks
ID: 965efd4b5d65fd82643f5727 	Decrypted: true 	Created: 2017-12-18T18:14:05.098Z 	Name: testbucket3
Warning: File already exists at path [/tmp/uploader.ks].
Would you like to overwrite [/tmp/uploader.ks]: [y/n] y
[======================================================================] 100.00%
Download Success!

./storj list-files <testbucket-name>

Example: List files in a bucket using bucket name
./storj list-files testbucket3
ID: 965efd4b5d65fd82643f5727 	Decrypted: true 	Created: 2017-12-18T18:14:05.098Z 	Name: testbucket3
ID: f10d046334eea2e7a6ba9723 	Size: 1448 bytes 	Decrypted: true 	Type: application/octet-stream 	Created: 2017-12-22T13:57:52.415Z 	Name: testjson.json
ID: 0f58c36885553516ccb63141 	Size: 9200 bytes 	Decrypted: true 	Type: application/octet-stream 	Created: 2018-01-09T16:53:18.496Z 	Name: teset1
ID: 190dc667ba33a72b00e3dbb7 	Size: 16528 bytes 	Decrypted: true 	Type: application/octet-stream 	Created: 2018-01-09T17:30:28.090Z 	Name: rs.o
ID: f25ae0dde4fb7b3559e8f089 	Size: 94808 bytes 	Decrypted: true 	Type: application/octet-stream 	Created: 2018-01-09T17:31:03.138Z 	Name: uploader.o
ID: b8c4543226e9c65f61aa0141 	Size: 279 bytes 	Decrypted: true 	Type: application/octet-stream 	Created: 2018-01-09T17:32:02.076Z 	Name: uploader.lo

./storj cp <path-to-local-filename> storj://<bucket-name>/<target-file-name>
./storj cp <path-to-local-filename> storj://<bucket-name>/.
./storj cp <path-to-local-filename> storj://<bucket-name>/<blank>

Example: uploading a file using ‘cp’ command. The target file name should be same as the upload file name, or ‘.’ or blank(no target file name)

Example: Using uploaded file name same as uploading same file
./storj cp /tmp/uploader.ksa storj://testbucket/uploader.ksa
ID: 6cb2014a988adca6ed712577 	Decrypted: true 	Created: 2018-01-04T16:55:29.832Z 	Name: testbucket
[======================================================================] 100.00%
Upload Success! File ID: 3092473ebc48a2d469a4a59d

Example: Using uploaded file name same as uploading same file, trying to upload a file already uploaded
./storj cp uploader.o storj://testbucket3/uploader.o
ID: 965efd4b5d65fd82643f5727 	Decrypted: true 	Created: 2017-12-18T18:14:05.098Z 	Name: testbucket3
Preparing File...
Upload failure: File already exists

Example: Uploading a file to a different bucket
./storj cp uploader.o storj://testbucket2/uploader.o
ID: 725131c74690150e7b0cc747 	Decrypted: true 	Created: 2017-12-18T16:41:41.583Z 	Name: testbucket2
[======================================================================] 100.00%
Upload Success! File ID: 6b82f6030fc688336190d768

Example: Using uploaded file name is entered as ‘.’

 ./storj cp http.o  storj://testbucket3/.
ID: 965efd4b5d65fd82643f5727 	Decrypted: true 	Created: 2017-12-18T18:14:05.098Z 	Name: testbucket3
[======================================================================] 100.00%
Upload Success! File ID: 65ac6ea61a175d06bcfa7567

Example: Missing uploaded file name (no file name entered or is blank)

./storj cp rs.lo storj://testbucket3/
[2212] target file name = rs.lo
ID: 965efd4b5d65fd82643f5727 	Decrypted: true 	Created: 2017-12-18T18:14:05.098Z 	Name: testbucket3
[======================================================================] 100.00%
Upload Success! File ID: fcd43a40f4543366d09ddb5c
./storj cp storj://<bucket-name>/<target-file-name> <path-to-local-filename>

Example: Downloaded file (teset1) same as the downloading file(teset1)
./storj cp storj://testbucket/teset1 /tmp/teset1
ID: 6cb2014a988adca6ed712577 	Decrypted: true 	Created: 2018-01-04T16:55:29.832Z 	Name: testbucket
[======================================================================] 100.00%
Download Success!

Example: Downloaded file(teset2) different from downloading file(teset1)
./storj cp storj://testbucket/teset1 /tmp/teset2
ID: 6cb2014a988adca6ed712577 	Decrypted: true 	Created: 2018-01-04T16:55:29.832Z 	Name: testbucket
[======================================================================] 100.00%
Download Success!

Example: Downloading same as above. The command prompts to overwrite?
./storj cp storj://testbucket/teset1 /tmp/teset2
ID: 6cb2014a988adca6ed712577 	Decrypted: true 	Created: 2018-01-04T16:55:29.832Z 	Name: testbucket
Warning: File already exists at path [/tmp/teset2].
Would you like to overwrite [/tmp/teset2]: [y/n] y
[======================================================================] 100.00%
Download Success!

Example: Downloaded file name not given
./storj cp storj://testbucket/teset1 /tmp/
ID: 6cb2014a988adca6ed712577 	Decrypted: true 	Created: 2018-01-04T16:55:29.832Z 	Name: testbucket
Warning: File already exists at path [/tmp/].
Would you like to overwrite [/tmp/]: [y/n] y
Unable to open /tmp/: Is a directory

Example: Downloaded file name is ‘.’
./storj cp storj://testbucket/teset1 /tmp/.
ID: 6cb2014a988adca6ed712577 	Decrypted: true 	Created: 2018-01-04T16:55:29.832Z 	Name: testbucket
Warning: File already exists at path [/tmp/.].
Would you like to overwrite [/tmp/.]: [y/n] y
Unable to open /tmp/.: Is a directory

Example: Downloaded file name is ‘*’-- DONT USE THIS COMMAND. It will overwrite the first file in the directory and renames it to the downloading file name.
./storj cp storj://testbucket/http.o /tmp/*
ID: 6cb2014a988adca6ed712577 	Decrypted: true 	Created: 2018-01-04T16:55:29.832Z 	Name: testbucket
Warning: File already exists at path [/tmp/Aac.o].
Would you like to overwrite [/tmp/Aac.o]: [y/n] y
[======================================================================] 100.00%
Download Success!

braydonf/libstorj,braydonf/libstorj,Storj/libstorj-c,braydonf/libstorj-c,aleitner/libstorj-c,Storj/libstorj-c,aleitner/libstorj-c,braydonf/libstorj-c