Retrieving Public Files
If you uploaded or added files to Public IPFS then you can access them with the methods mentioned previously, or just by appending thecid
to the gateway
url like so:
?filename=image.png
, ?download=true
.
By default your gateway will only be able to fetch the files that are pinned to your account. If you want to open your gateway to access any file on IPFS check out our guide for Access Controls.
cid
, a special identifier given to each file based on the cotnent of that file.
pinataGateway
in the config.
Image Optimizations
With public files you can simply append the Image Optimizations queries which would look something like this:Adding a Custom Domain
Pinata also allows you to create a custom domain for your Dedicated Gateway. Simply visit the Gateways Page, click the menu button on the right side of your gateway, then click Add Custom Domain. You’ll need to own the domain you want to use. When you enter your domain, you will be prompted to enter DNS information through your registrar.Retrieving Private Files
All content uploaded with Private IPFS is by default private, and there are a few ways you can view it. One of the simplest ways to fetch content is through the get method in the SDK. All content is referenced by thecid
, a special identifier given to each file based on the cotnent of that file.