Hey everyone!
It’s my first time trying Storj. I’ve a few images that I want to show on my websites without storing them on my shared hosting server. Is it possible somehow to keep the images on Storj and get a public link of the images that can be directly entered into the <img src="" />
tag?
Any help is really appreciated.
Hi @DezyNation
There are a number of ways you can do this.
The simplest is using the web interface and then for each image you can generate a sharing link which can be mapped to the raw image. Linksharing Service | Storj Docs
A more advanced option is using the uplink share command to a single folder with all the images contained within - share | Storj Docs
Hello @DezyNation,
Welcome to the forum!
You may also take a look on: Host a Static Website | Storj Docs
I checked the documentation but there’s no such feature to share only images. It’s giving me a storj link (jtjtjtjuy-min.jpg | Storj DCS)
This link can’t be used in src
attribute of img
tag.
This link is opening a storj page👇
But I want my image only.
Please help.
Try using this img
tag and tell me if it works.
https://link.eu1.storjshare.io/raw/jui5ustxavbr2clypzb3juffhc2a/edulec-assets/jtjtjtjuy-min.jpg>
As @alexey suggested below the correct link would be
<img src="https://link.storjshare.io/raw/jui5ustxavbr2clypzb3juffhc2a/edulec-assets/jtjtjtjuy-min.jpg">
without the eu1
region mentioned.
It worked! Thanks a lot, you really saved my day (in fact a whole week)
But how did you know the file is being stored in European Union’s server?
Will this link.eu1....
always work? Ho can I get this link for my other images?
Yes, it will always work. Replace the /s/
with /raw/
in your share links.
It’s better to use link.storjshare.io instead of regional one, because the routing depends on the customer’s location. If you hardcode the region, the customer will always use this region, even if they are form Australia or Americas.
Hello here
I’m trying to use storj as s3 storage for my media files, and i see that the best form to include the resources is using the link.storjshare.io url.
But i suppose i’m doing something bad, because all my folders are listed in public and all the files are visible. How can i configure this? In the example link of this thread i see that you can prevent directory listing, but i don’t know how to do it.
Thnkssssssss
You can do it using the --disallow-lists
flag of uplink share
command of the Uplink CLI tool: share - Storj DCS Docs