Türkçe
Türkçe
Appearance
Türkçe
Türkçe
Appearance
İlk dosyanızı iki dakikadan kısa sürede IPFS'e yükleyin.

ipfs.ninja adresinde Google hesabınızla kaydolun. Varsayılan bir API anahtarı otomatik olarak oluşturulur. API anahtarlarınızı görüntülemek ve yönetmek için Profil sayfanıza gidin.
WARNING
Not: API anahtarlarının süresi dolmaz. Birden fazla anahtar oluşturabilir ve bunları Profil sayfanızdan tek tek iptal edebilirsiniz.
İçeriğinizle /upload/new adresine bir POST isteği gönderin. İşte bir JSON nesnesi yükleme örneği:
curl -X POST https://api.ipfs.ninja/upload/new \
-H "X-Api-Key: bws_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"content": {
"name": "My NFT",
"description": "A permanent file on IPFS",
"image": "ipfs://QmExampleCID..."
},
"description": "NFT metadata"
}'const response = await fetch("https://api.ipfs.ninja/upload/new", {
method: "POST",
headers: {
"X-Api-Key": "bws_your_api_key_here",
"Content-Type": "application/json"
},
body: JSON.stringify({
content: {
name: "My NFT",
description: "A permanent file on IPFS",
image: "ipfs://QmExampleCID..."
},
description: "NFT metadata"
})
});
const data = await response.json();
console.log(data.cid); // "QmXmCX9S6ANV..."
console.log(data.uris.url); // "https://ipfs.ninja/ipfs/QmXmCX9S6ANV..."API, CID'yi, dosya boyutunu ve erişim URI'lerini döndürür:
{
"cid": "QmXmCX9S6ANVjYJh3rJmXjqgYtYv7WZLUDL2XCwdPrvUwN",
"sizeMB": 0.001,
"uris": {
"ipfs": "ipfs://QmXmCX9S6ANVjYJh3rJmXjqgYtYv7WZLUDL2XCwdPrvUwN",
"url": "https://ipfs.ninja/ipfs/QmXmCX9S6ANVjYJh3rJmXjqgYtYv7WZLUDL2XCwdPrvUwN"
}
}Dosyanıza iki yolla erişebilirsiniz:
curl https://ipfs.ninja/ipfs/QmXmCX9S6ANVjYJh3rJmXjqgYtYv7WZLUDL2XCwdPrvUwNcurl https://api.ipfs.ninja/file/QmXmCX9S6ANVjYJh3rJmXjqgYtYv7WZLUDL2XCwdPrvUwN \
-H "X-Api-Key: bws_your_api_key_here"Yanıt:
{
"cid": "QmXmCX9S6ANVjYJh3rJmXjqgYtYv7WZLUDL2XCwdPrvUwN",
"fileName": "NFT metadata",
"fileType": "json",
"sizeMB": 0.001,
"createdAt": 1711036800000,
"uris": {
"ipfs": "ipfs://QmXmCX9S6ANVjYJh3rJmXjqgYtYv7WZLUDL2XCwdPrvUwN",
"url": "https://ipfs.ninja/ipfs/QmXmCX9S6ANVjYJh3rJmXjqgYtYv7WZLUDL2XCwdPrvUwN"
}
}