Uplink share max-object-ttl

Hi everyone,

I’ve recently shared some files and stumbled over the “max-object-ttl” option. Usually, I’d expect this option to be set on upload such that a new file will be automatically removed after a certain period. As stated in the documentation (Setting Object Lifecycles - Storj Docs), it is also possible to set a general expiration date for all files uploaded via a specific access grant (if I understand that description correctly).

Nevertheless, what does the option “max-object-ttl” of the Uplink share command do? Since the share command doesn’t alter the original files (as far as I understand), what exactly does this option do here? If I restrict a sharelink, for example, to the next 7 days, then what difference does it make if I also set “max-object-ttl” to 168 h? Each sharelink/URL is unique so choosing this setting for one sharelink shouldn’t suddenly delete the original file such that other sharelinks cannot access it anymore.

I’m sorry if this question has already been answered elsewhere but I couldn’t find an explanation in the documentation.

Thanks!

Hi @mpw ,

If this doesn’t answer your questions please let me know and I will leave a request for a team member to explain further

The access grant expiration (and thus the linkshare URL) would happen if you would use the --not-after option in the uplink share command.
The --max-object-ttl option is used to automatically delete an object which would be uploaded with this access grant. Of course it wouldn’t alter already existing objects.

The uplink share command is generally used to generate a new access grant, you may also register it on the GatewayMT to get S3 credentials and/or generate an URL, the access generation doesn’t affect existing objects.
However, if you would use --url or didn’t provide at least write permissions, --max-object-ttl wouldn’t be useful - you cannot upload an object with a read only access grant.

1 Like