Decentralized Cloud Storage
Resources

Create an Access to an Object

There are two ways to share access to an object:

In both cases, you can create an access using the uplink share command. For example:

Windows
Linux
macOS
Windows
./uplink.exe share sj://cakes/cheesecake.jpg --export-to cheesecake.access
Linux
uplink share sj://cakes/cheesecake.jpg --export-to cheesecake.access
macOS
uplink share sj://cakes/cheesecake.jpg --export-to cheesecake.access

An access generated using uplink share with no arguments creates an access to your entire project with read permissions.

The --export-to flag is used to export the access to a file. This gives the following output:

=========== ACCESS RESTRICTIONS ==========================================================
Download : Allowed
Upload : Disallowed
Lists : Allowed
Deletes : Disallowed
NotBefore : No restriction
NotAfter : No restriction
Paths : sj://cakes/cheesecake.jpg
=========== SERIALIZED ACCESS WITH THE ABOVE RESTRICTIONS TO SHARE WITH OTHERS ===========
Access : 12yUGNqdsKX1Xky2qVoGwdpL...
Exported to: cheesecake.access

Restrictions

The --readonlyflag prevents all write operations (delete and write). Similarly, the --writeonly flag prevents all read operations (read and list).

By default, the access is a read-only. To give full permissions, use--readonly=false

You may also indicate the duration of access with a start and end time.

The list of all restrictions can be found here. Example:

Windows
Linux
macOS
Windows
./uplink.exe share --readonly=false --not-before=+2h --not-after=+10h sj://cakes/
Linux
uplink share --readonly=false --not-before=+2h --not-after=+10h sj://cakes/
macOS
uplink share --readonly=false --not-before=+2h --not-after=+10h sj://cakes/
=========== ACCESS RESTRICTIONS ==========================================================
Download : Allowed
Upload : Allowed
Lists : Allowed
Deletes : Allowed
NotBefore : 2021-04-17 17:22:39
NotAfter : 2021-04-18 01:22:39
Paths : sj://cakes/ (entire bucket)
=========== SERIALIZED ACCESS WITH THE ABOVE RESTRICTIONS TO SHARE WITH OTHERS ===========
Access : 123qSBBgSUSqwUdbJ6n4bxLM...

See the Uplink CLI share command reference for more actions