Hello, I would greatly appreciate if you could help me with a problem I have.
You see, I have a fairly large website and the truth is that the cost of Amazon’s S3 is quite high, so I started experimenting a bit with Storj.
My website mainly focuses on uploading videos, images, gifs, etc… it’s very similar to Imgur or 9gag, but in Spanish.
I have replaced the s3 endpoint with https://gateway.storjshare.io, the region, etc…
And it works very well, what’s my problem? The direct link it provides, for example: https://testing.gateway.storjshare.io/Images/95e35.jpg has no kind of permissions and the only way I’ve seen that I can share it is by generating a sharing link.
As you can see, this is not efficient. The goal is to upload a file and be able to access it directly.
I’ve tried looking in their documentation and I can’t find a way to do it.
The only way is something like this: https://link.eu1.storjshare.io/raw/IDSHARE/imgur/Images/3de33.png
And another thing, does this link have any limitations? That is, does it have an expiration time or bandwidth limit?
Is there any way I can do this more comfortably?
Thank you very much.
Welcome to the forum @Simona !
Storj staff will respond to you in due time. In the meantime you can take a look at this tool made by a dotnet developer here.
Have you seen Linksharing Service - Storj DCS Docs ? I think it answers these questions.
In short, yes, you can upload a file or directory of files and be able to access them directly. And yes, the link can have an expiration time. Unfortunately, we don’t yet have the capability to limit share links by amount of bandwidth consumed.
I was finally able to find it.
uplink share --url --readonly --disallow-lists --not-after=none sj://BUCKET
The only problem I have at the moment is that mp4 videos download automatically and don’t play on the web.
Make sure you don’t have
wrap=0 at the end of the URL. (or use wrap=1). (or
/raw/ instead of
/s/ in the URL)
I just tested the same command and my browser played the uploaded mp4 (h264 encoded) file.
The ability to play video depends on your browser and codecs installed in the OS.
If you trying to embed video on your site, you need to replace
/raw/ in the URL, otherwise you can see it only in a preview mode as a separate page.