Hello, how can I make access to this link public please ?
https://gateway.storjshare.io/uploads/main/06b762c99314d18854fc99aa68b58a83.png
Hello, how can I make access to this link public please ?
https://gateway.storjshare.io/uploads/main/06b762c99314d18854fc99aa68b58a83.png
Hello @Zyker,
You may also setup a reverse proxy for mounted bucket and serve this object on your server or use a reverse proxy with Self-hosted S3-compatible Gateway in web-server mode.
The other way is to configure your own domain to host a static website: Hosting a Static Website - Storj Docs
I don’t understand what exactly to do, can you tell me exactly what to do please?
uplink share --url --not-after=+2h sj://uploads/main/06b762c99314d18854fc99aa68b58a83.png
You will get a public URL for exactly this object, it will expire after 2 hours. If you specify --not-after=none
, it will never expire.
But I guess you have some kind of CMS and you have a lot of objects like this. If so, you need to setup a static web site and use your own domain instead of https://gateway.storjshare.io
for such objects in the configuration of your site.
You may also skip the static web site setup and generate a public URL for the prefix
uplink share --url --not-after=+1h sj://uploads/main/
replace /s/
to /raw/
in the generated URL and use it instead of https://gateway.storjshare.io/uploads/main/
in every link on your site.
If you develop an own site or mobile app you may also use presigned URLs:
You can also make the bucket public, which would make any content in the bucket accessible. See Creating Public Buckets and Embedding Content - Storj Docs
i already did what you told me i have this it doesn’t work
uplink share sj://website/ --readonly=false
Sharing access to satellite 12L9ZFwhzVpuEKMUNUqkaTLGzwY9G2tbiigLiXZWKwmcNDDs@eu1.storj.io:7777
=========== ACCESS RESTRICTIONS ==========================================================
Download : Allowed
Upload : Allowed
Lists : Allowed
Deletes : Allowed
NotBefore : No restriction
NotAfter : No restriction
MaxObjectTTL : Not set
Paths : sj://website/ (entire bucket)
=========== SERIALIZED ACCESS WITH THE ABOVE RESTRICTIONS TO SHARE WITH OTHERS ===========
Access : 19T3cUq1QiP6bazRTxQkv3QT3UjcNS3paRwmKaF5aTeJttQEtipgrp41Ev5VFhb68kCZWB8yQu6EeGeL2HrAwpPMCRw79gEwebP98WZdfyE2XoBaG8DefUkVPmBLuP9YETheRierhhQmwzGhCw38Jyfn257iyba6ciTT6BiCRBhSA37UVhof77ULX6LQePewdVW1Vb7awkQq7B9UKfLYqEpsmM8p2qzsQkYeFdxZBZWAT3qR38L4yWSs4VtEEnueHekuW6KSmye4E6DhCD8bQ2etsbQE7tNZvGuxRyY4YJ3djUEPGF2yUKJNzxMAmFAbEb8zDG1eSW
You missed --url
flag to generate an URL.
If you want to use a serialized access grant directly, then you need to combine it to the URL:
https://link.storjshare.io/s/<serialized-access-grant>/<bucket>[/<prefix>]/<object>
to have a raw link, you need to replace /s/
to /raw/
.
I would suggest to register the read-only access grant on Gateway-MT either adding --url
or --register --public
to your uplink share
command and use the generated Access Key in your URL (it will be shorter and doesn’t allow to get an underlaying access grant directly), this way it would be safer to publish such a URL publicly.
P.S. It’s very unsafe to publish your access grant, especially with --read-only=false
permissions - anyone can start to abuse your account, I would suggest to revoke a published unrestricted access grant: Revoke an Access to an Object - Storj Docs or delete a root access grant from the satellite UI: Generating and Managing Access Grants - Storj Docs if that happen.
If you accepting the risk of usage of the access grant on your public site, it’s better to put restrictions on it, at least removing Upload and Delete permissions. To use such permissions on backend you may generate a separate access grant, but it shouldn’t be publicly available.
Is it just me, or does this seem dangerous?
There doesn’t seem to be anything stopping a malicious user from F5 bombing it to jack up your egress costs.
Hello @rei,
Welcome to the forum!
Usually the site owners who uses the public bucket as a content storage would be charged for usage from the bucket independently of the backend. There is always a cost involved.
However, you may also setup a caching, which is a common practice for such usages or use the CDN (for Storj it’s not required, it’s already highly distributed across the globe, but you may use it to cache your content more effectively than implemented in your CMS), but CDN is not free too in many cases.
Oh, of course. To be honest, I don’t know why I didn’t think of that I’m gonna blame my flu.
Thanks!