mc share upload

Generate the curl command to upload objects without requiring access/secret keys.

Syntax

CLI
mc share upload [FLAGS] TARGET [TARGET...]

FLAGS:
  --recursive, -r                 recursively upload any object matching the prefix
  --expire value, -E value        set expiry in NN[h|m|s] (default: "168h")
  --content-type value, -T value  specify a content-type to allow
  --json                          enable JSON lines formatted output
  --debug                         enable debug output
  --insecure                      disable SSL certificate verification
  --help, -h                      show help

Parameters

Parameter Description
TARGET The alias of a configured HPE Ezmeral Object Store deployment to which to upload the object. This parameter is mandatory.
recursive Recurively upload all objects that match the prefix.
expire Set the time in hours, minutes and seconds when the curl command expires. The default expiry time is 168 hours (7 days).
content-type The content type that is permitted to be uploaded.
json Enable JSON formatted output.
debug Enable output for debugging.
insecure Disable SSL verification.
help Show this help.

Examples

  1. Generate a curl command to allow upload access for a single object named secret.gz to a bucket named northamerica in the Object Store deployment with alias salesobject, with 10 days expiry time:
    CLI
    /opt/mapr/bin/mc share upload --expire=10d salesobject/northamerica/secret.gz
  2. Generate a curl command to allow upload access of only .png images to a folder called images in a bucket named northamerica in the Object Store deployment with alias salesobject, with 10 days expiry time :
    CLI
    /opt/mapr/bin/mc share upload --content-type=image/png --expire=10d salesobject/northamerica/secret.gz
  3. Generate a curl command to allow uploading objects that match the key prefix 'backup/' to a bucket named northamerica in the Object Store deployment with alias salesobject. The command expires in 2 hours:
    CLI
    mc share upload --recursive --expire=2h salesobject/northamerica/backup/