more helpers for uploading

This commit is contained in:
Ville Rantanen
2018-02-13 21:42:02 +02:00
parent 98035cea41
commit 5cec2f2a19
2 changed files with 27 additions and 2 deletions

View File

@@ -202,12 +202,12 @@ def print_rest_api(shares, config, opts):
sys.exit(0)
print("Link to upload file to the share:")
print("curl -F file=@'the_file_name.ext' %s/upload/%s/%s"%(
print("\n# curl -F file=@'the_file_name.ext' %s/upload/%s/%s"%(
config['public_url'],
share['name'],
share['pass_hash']
))
print("cat file_to_send.ext | curl -F file='@-;filename=the_file_name.ext' %s/upload/%s/%s"%(
print("or \n\n# curl -s %s/script/upload/%s/%s | bash /dev/stdin file_to_upload.ext"%(
config['public_url'],
share['name'],
share['pass_hash']