Skip to main content
Buckets and files

Share a file with a temporary link

Make a presigned link that stops working after the time you choose.

A temporary link (presigned URL) lets anyone who has it download one file until the link expires. The bucket and the file stay private. Use it to send a file to someone who has no Zata account.

Open Share

In the bucket, open the ⋮ menu in the file's row and select Share.

A file's actions menu with Share pointed out
Set how long the link works

In Share Object, enter the Number of hours and Number of minutes. The default is 10 minutes. The longest is 7 days (168 hours): a longer time is cut to 7 days.

The Share Object window with the hours and minutes fields and the Create Link button
Create and copy the link

Select Create Link. The link appears under Presigned URL Generated with its expiry time. Select Copy URL and send the link.

The generated presigned URL with its expiry time and the Copy URL button

Opening the link in a browser downloads or shows the file. To share an older version of a file, turn on Show Versions and select Share in that version's menu. You can also share from the Preview Manager.

Anyone who has the link can use it until it expires, and the console cannot cancel a link early. Pick a short time and send the link only to the right person. Downloads count towards your egress.

For a link that never expires, make the file public instead.

These commands were tested on Zata. They use the zata profile and keys from Access keys.

Download link with the AWS CLI. The AWS CLI can only make download links. --expires-in is in seconds, up to 7 days (604800):

aws s3 presign s3://my-bucket/myfile.txt --expires-in 3600 --profile zata

Download and upload links with Python (boto3). For Mumbai, use https://bom01.zata.ai:

import boto3
from botocore.config import Config

s3 = boto3.client(
"s3",
endpoint_url="https://idr01.zata.ai",
region_name="us-east-1",
config=Config(
signature_version="s3v4",
s3={"addressing_style": "path"},
request_checksum_calculation="when_required",
response_checksum_validation="when_required",
),
)

download_url = s3.generate_presigned_url(
"get_object", Params={"Bucket": "my-bucket", "Key": "myfile.txt"}, ExpiresIn=3600
)
upload_url = s3.generate_presigned_url(
"put_object", Params={"Bucket": "my-bucket", "Key": "upload.txt"}, ExpiresIn=3600
)
print(download_url)
print(upload_url)

boto3 reads the keys from the environment variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY.

Use an upload link:

curl -X PUT --upload-file upload.txt "UPLOAD_URL"
  • If the link was made with a ContentType (for example Params={..., "ContentType": "text/plain"}), the upload must send exactly that header (-H "Content-Type: text/plain"). Otherwise Zata answers 403.
  • If the link was made without a ContentType, send no Content-Type header. Some HTTP libraries add one by themselves, which also gives 403.
  • A link made by a tool stops working when it expires, or when the access key that signed it is deleted or disabled.

rclone link does not work on Zata (not found: FixupRequest). Use the console, the AWS CLI or an SDK instead.