file versioning
This commit is contained in:
@@ -324,6 +324,11 @@ def print_rest_api(shares, config, opts):
|
||||
share['pass_hash'],
|
||||
filename
|
||||
))
|
||||
print("or \n\n# curl -s %s/script/download/%s/%s | bash /dev/stdin [-f]"%(
|
||||
config['public_url'],
|
||||
share['name'],
|
||||
share['pass_hash']
|
||||
))
|
||||
elif opts.type == "direct":
|
||||
if 'direct_links' not in share or not share['direct_links']:
|
||||
print("Direct downloading not allowed in this share")
|
||||
@@ -348,6 +353,11 @@ def print_rest_api(shares, config, opts):
|
||||
get_direct_token(share,filename),
|
||||
filename
|
||||
))
|
||||
print("or \n\n# curl -s %s/script/direct/%s/%s | bash /dev/stdin [-f]"%(
|
||||
config['public_url'],
|
||||
share['name'],
|
||||
share['pass_hash']
|
||||
))
|
||||
elif opts.type == "zip":
|
||||
print("ZIP download:")
|
||||
print("%s/zip/%s/%s"%(
|
||||
@@ -401,7 +411,7 @@ def parse_options():
|
||||
parser_add.add_argument('-P','--public', action="store_true", dest="public", default = False)
|
||||
parser_add.add_argument('-u','--upload', action="store_true", dest="upload", default = False)
|
||||
parser_add.add_argument('-o','--overwrite', action="store_false", dest="overwrite", default = True,
|
||||
help = "Disable file overwrites")
|
||||
help = "Disable file overwrites. If disabled, old files are versioned with modification date.")
|
||||
parser_add.add_argument('-d','--direct', action="store_true", dest="direct", default = False,
|
||||
help = "Allow direct file sharing (password hash included in URL)")
|
||||
parser_add.add_argument('--pass-plain', action="store_true", dest="plain", default = False,
|
||||
@@ -429,7 +439,7 @@ def parse_options():
|
||||
parser_modify.add_argument('-P','--public', action="store", dest="public", default = None, choices = ['true','false'])
|
||||
parser_modify.add_argument('-u','--upload', action="store", dest="upload", default = None, choices = ['true','false'])
|
||||
parser_modify.add_argument('-o','--overwrite', action="store", dest="overwrite", default = None, choices = ['true','false'],
|
||||
help = "Disable file overwrites")
|
||||
help = "Disable file overwrites. If disabled, old files are versioned with modification date.")
|
||||
parser_modify.add_argument('-d','--direct', action="store", dest="direct_links", default = None, choices = ['true','false'],
|
||||
help = "Allow direct file sharing (password hash included in URL)")
|
||||
parser_modify.add_argument('--pass-plain', action="store_true", dest="plain", default = False,
|
||||
|
||||
Reference in New Issue
Block a user