# WEEK 8 QUESTIONS | May 24 - May 30, 2021

**URL:** <https://discuss.ipfs.tech/t/week-8-questions-may-24-may-30-2021/11434>\
**Category:** Help\
**Tags:** js-ipfs, ipld, go-ipfs, ipns, files, weekly-questions\
**Created:** [June 1, 2021, 12:02am UTC](https://discuss.ipfs.tech/t/week-8-questions-may-24-may-30-2021/11434 "2021-06-01T00:02:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Discordian](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/discordian/32/4692_2.png) [@Discordian](https://discuss.ipfs.tech/u/Discordian)\
**Post date:** [June 1, 2021, 12:02am UTC](https://discuss.ipfs.tech/t/week-8-questions-may-24-may-30-2021/11434/1 "2021-06-01T00:02:20Z")

</div>

# WEEK 8 QUESTIONS | May 24 - May 30, 2021 (times are in EST)

It is week 8! 🎉 I’ve attempted to highlight interesting or common questions, I’ve even included one from Reddit! This week had a few questions which will certainly be great for people new to the space to give a look over, as well as a good question about adding data to IPFS from a browser for later retrieval.

## Questions

### novaknole asked “Upload file with json to ipfs (best way ? )” ([forum - 12:55 May 28](https://discuss.ipfs.tech/t/upload-file-with-json-to-ipfs-best-way/11405))

> [@Upload file with json to ipfs (best way ? )](https://discuss.ipfs.tech/t/upload-file-with-json-to-ipfs-best-way/11405/1):
>
> I have a file which I want to upload to ipfs, but with the file, i also want to upload a string. So, JSON seems to be a good way.
> 
> ```auto
> const finalData = {
> title: 'title here',
> data: HTMLInputFileElement
> }
> 
> ```
> 
> Question 1. Can I pass this `data` to ipfs and get one cid ? the problem is that I think the file in `data` property won’t be uploaded and this is a problem. So The only choice I have is that first I upload the file, get the CID, put the `CID` inside `data` key and then upload `finalData` again to ipfs and get another cid.
> 
> The problem is that when I query CID, I have to first get a json and then query ipfs again for `data` in order to get a file. Isn’t there a better way not to do this 2 things ? is there any other choice to achieve what I want ?

#### Observation:

This is an excellent question! It’s definitely worth giving that thread a look. We talk about different ways you can store data on IPFS, as well as some features Pinata has to assist with getting data available.

* * *

### Bonelessbonles asked “Websites on IPFS” ([Reddit - 19:09 May 29](https://old.reddit.com/r/ipfs/comments/nnyi0c/websites_on_ipfs/)) ✅

> Is there a way to put websites up on IPFS? If so, how would I do so?

#### Observation:

This question comes up from time-to-time and the answer is: Of course you can! As long as the website is static, you can simply `add` to to IPFS, and you’re good-to-go! I use IPFS on a website I host almost every day for random things: [http://portal.thedisco.zone](http://portal.thedisco.zone).

* * *

### BnMcGn asked “IPFS in browser: testing a simple file fetch” ([StackOverflow - 17:09 May 29](https://stackoverflow.com/q/67753974)) ✅

> I want to download [this](https://ipfs.io/ipfs/Qmc3zqKcwzbbvw3MQm3hXdg8BQoFjGdZiGdAfXAyAGGdLi/) file and print its contents to the console using an in-browser IPFS node.  
> […]
> 
> ```javascript
> const inode = await Ipfs.create({
> config: {
> Addresses: {
> Swarm: [
> // These webrtc-star servers are for testing only
> '/dns4/wrtc-star1.par.dwebops.pub/tcp/443/wss/p2p-webrtc-star',
> '/dns4/wrtc-star2.sjc.dwebops.pub/tcp/443/wss/p2p-webrtc-star'
> ]
> },
> Bootstrap: []
> }
> })
> window.inode = inode; //For poking
> 
> for await (const chunk of inode.cat(ifile)) {
> console.log(chunk.toString());
> }
> 
> ```
> 
> […]  
> But it doesn’t print anything. What am I missing?

#### Observation:

There are no bootstrap nodes! Simply connecting to another peer resolves this issue. It’s important to ensure you’re connecting to other peers, because otherwise how are you going to find data if there’s no one to ask where it is?

* * *

### Fayne Aldan asked “Does anyone know what I’d do if I want to host a gateway?” ([#ipfs - 13:14 May 28](https://matrix.to/#/!gWiVYCURkxIapWZaGy:ipfs.io/$XOK844bk9t9hVD_OjL4tJlYV8UdcK4VsvQgAyibBxG8?via=ipfs.io&via=matrix.org&via=asra.gr)) ✅

> where do I actually get the IPFS gateway from?

#### Observation:

You actually get the gateway from your very own local gateway! You might have noticed you can access your own local gateway with URLs like [http://ipfs.io.ipns.localhost:8080](http://ipfs.io.ipns.localhost:8080). Well, it’s actually that very gateway that you’d configure and use! To enable SSL, you simply use Nginx as a reverse proxy, and there are plenty of guides online about how to do that. Using Nginx, you can also give your gateway a publicly accessible address but be warned, there’s no telling how popular your public gateway might get, and consume all your bandwidth 😉 .
