mc share download command generates a temporary presigned URL with
integrated access credentials for downloading objects from a MinIO bucket. The
temporary URL expires after a configurable time limit.
Applications can perform a
GETto retrieve the object from the URL.
Users can open the URL in a browser to download the object.
For more information on shareable object URLs, see the Amazon S3 documentation on Pre-Signed URLs.
The following command generates a new presigned download URL for the
mydata bucket on the
myminio MinIO deployment:
mc share download --recursive myminio/mydata
The command has the following syntax:
mc [GLOBALFLAGS] share upload \ [--expire "string"] \ [--recursive] \ [--version-id "string"] \ ALIAS
indicate optional parameters.
Parameters sharing a line are mutually dependent.
Parameters separated using the pipe
|operator are mutually exclusive.
Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.
Required The alias of a MinIO deplyment and the full path to the object for which to generate a download URL. For example:
mc share download play/mybucket/object.txt
You can specify multiple objects on the same or different MinIO deployments. For example:
mc share download play/mybucket/object.txt play/mybucket/otherobject.txt
If specifying the path to a bucket or bucket prefix, you must also specify the
--recursiveargument. For example:
mc share download --recursive play/mybucket/ mc share download --recursive play/mybucket/myprefix/
- --expire, E
Optional Set the expiration time limit for all generated URLs.
Specify a string with format
##h##m##sformat. For example:
12h34m56sfor an expiry of 12 hours, 34 minutes, and 56 seconds after URL generation.
168hor 168 hours (7 days).
- --recursive, r
Optional Recursively generate URLs for all objects in a
mc share download ALIASbucket or bucket prefix.
Required if any
ALIASspecifies a path to a bucket or bucket prefix.
This command supports any of the global flags.
mc share download to generate a URL that supports
GET requests for an object:
mc share download --expire DURATION ALIAS/PATH
mc share download --recursive --expire DURATION ALIAS/PATH
The mc commandline tool is built for compatibility with the AWS S3 API and is tested with MinIO and AWS S3 for expected functionality and behavior.
MinIO provides no guarantees for other S3-compatible services, as their S3 API implementation is unknown and therefore unsupported. While mc commands may work as documented, any such usage is at your own risk.