# IPFSとは何ですか?

InterPlanetary File System (IPFS) is a peer-to-peer protocol for storing and sharing data in a distributed file system. Currently, IPFS is the primary protocol for storing digital media, which many NFTs represent. In short, the NFT is on the blockchain and points to IPFS media files in it's metadata.

### なぜIPFSなのか?

InterPlanetary File System (IPFS) は、分散ファイル システムにデータを保存および共有するためのピアツーピア プロトコルです。 現在、IPFS はデジタル メディアを保存するための主要なプロトコルであり、多くの NFT がそれに代表されます。 つまり、NFT はブロックチェーン上にあり、そのメタデータで IPFS メディア ファイルを指します。

### どのように機能するのでしょうか?

IPFS に追加されるすべてのファイルには、ファイルのコンテンツのハッシュに基づいて一意のアドレスが割り当てられます。 このアドレスはコンテンツ識別子 (CID) と呼ばれ、ファイルのハッシュと使用されるハッシュ アルゴリズムの一意の識別子を 1 つの文字列に結合します。

その結果、まったく同じファイルを再度アップロードすると、常に同じ IPFS ハッシュ/CID を受け取ることになります。 これは、トークンのアップロードに使用したサードパーティがファイルをサポートしなくなり、ファイルを「削除」した場合でも、自分でファイルを再アップロードでき、NFT がメディア ファイルを正しくフェッチできるようになることを意味します。

{% hint style="info" %}
NMKR Studio では、独自のベアメタル サーバーを使用してメディア ファイルをアップロードし、固定しています。

メディア ファイルを自分で IPFS にアップロードする場合は、ハッシュを使用してメタデータに挿入することもできます。
{% endhint %}

### NFTのメタデータ内のCID

例として、メタデータで IPFS がどのように使用されるかを示します。アップロードされたファイルの CID / IPFS ハッシュは、次の文字列のようになります。

```
QmQ878cbFuPj9GWij1KXowcQP6RY1kHQm3Y6dkAe4VPaRz
```

トークンのメタデータには、このハッシュを NFT にリンクするフィールドが含まれており、エクスプローラー、ウォレット、DApps で表示できるようになります。

```
"src": "ipfs://QmSz8jA6LfU6NSSaobybvzsobbuaQwVBZ8CCBe2hmpfFDg",
```

IPFS ではファイル形式を区別しないため、メタデータには正しい形式のメディア ファイルを識別するフィールドも含まれています。

```
"mediaType": "image/jpeg",
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.nmkr.io/jp/dao-ru/nfttoha/ipfstohadesuka.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
