storj-thirdparty / uplink-python

Python bindings for libuplink
https://storj.io
Apache License 2.0
20 stars 10 forks source link

Allow for link sharing? #19

Closed biohoo closed 1 year ago

biohoo commented 2 years ago

I'd like to place an enhancement request to allow for link sharing and webhosting for the access module. Similar to contents described here:

https://docs.storj.io/dcs/api-reference/uplink-cli/share-command#link-sharing

Erikvv commented 2 years ago

We expose these native functions for this

So we need someone to add this to the Python bindings. (there is currently this issue but it should be working soon)

Currently already you can get the same result by getting an access key through http:

curl --request POST \
  --url https://auth.eu1.storjshare.io/v1/access \
  --header 'Content-Type: application/json' \
  --data '{
        "access_grant": "asdfasdfasdfasdfasdfasdfasdfasdfasdf",
        "public": true
}'
{
    "access_key_id":"juwmnxmqqspj6yofzmkwjpxv5opq",
    "secret_key":"j2ivf5vdrmwaalzte6flhlv2tbyfktbpo5nyp2756vz3piqdydmtm",
    "endpoint":"https://gateway.eu1.storjshare.io"
}

Then you can use this access_key_id inside the linksharing url like https://link.storjshare.io/s/jvfizc37vgr5ohyxwreg7abnxxrq/nextcloud-app-assets/