v1/s3/put-object REST API Endpoint
身體參數
Body
file
必填
載入中...
Key
字串
必填
載入中...
ContentType
字串
必填
載入中...
退貨
requestid
字串
載入中...
狀態
字串
載入中...
建立
字串
載入中...
pin
物件
載入中...
cid
字串
載入中...
名稱
字串
載入中...
origins
陣列
載入中...
meta
物件
載入中...
資訊
物件
載入中...
大小
字串
載入中...
delegates
字串
載入中...
請求
1curl --location 'https://api.quicknode.com/ipfs/rest/v1/s3/put-object' \2--header 'x-api-key: YOUR_API_KEY' \3--form 'Body=@"YOUR_FILE_PATH"' \4--form 'Key="YOUR_FILE_NAME"' \5--form 'ContentType="YOUR_CONTENT_TYPE"'
1curl --location 'https://api.quicknode.com/ipfs/rest/v1/s3/put-object' \2--header 'x-api-key: YOUR_API_KEY' \3--form 'Body=@"YOUR_FILE_PATH"' \4--form 'Key="YOUR_FILE_NAME"' \5--form 'ContentType="YOUR_CONTENT_TYPE"'
1var myHeaders = new Headers();2myHeaders.追加("x-api-key", "您的 API 金鑰");34var formdata = new FormData();5formdata.append("Body", fileInput.files[0], "YOUR_FILE_PATH");6formdata.append("Key", "YOUR_FILE_NAME");7formdata.append("ContentType", "YOUR_CONTENT_TYPE");89var requestOptions = {10方法: 'POST',11標題: myHeaders,12body: formdata,13redirect: 'follow'14};1516fetch("https://api.quicknode.com/ipfs/rest/v1/s3/put-object", requestOptions)17.then(response => response.text())18.then(result => console.log(result))19.catch(error => console.log('error', error));20
1var myHeaders = new Headers();2myHeaders.追加("x-api-key", "您的 API 金鑰");34var formdata = new FormData();5formdata.append("Body", fileInput.files[0], "YOUR_FILE_PATH");6formdata.append("Key", "YOUR_FILE_NAME");7formdata.append("ContentType", "YOUR_CONTENT_TYPE");89var requestOptions = {10方法: 'POST',11標題: myHeaders,12body: formdata,13redirect: 'follow'14};1516fetch("https://api.quicknode.com/ipfs/rest/v1/s3/put-object", requestOptions)17.then(response => response.text())18.then(result => console.log(result))19.catch(error => console.log('error', error));20
1匯入 請求23url = "https://api.quicknode.com/ipfs/rest/v1/s3/put-object"45payload = {'Key': 'YOUR_FILE_NAME',6'ContentType': 'YOUR_CONTENT_TYPE'}7files=[8('Body',('YOUR_FILE_NAME',open('YOUR_FILE_PATH','rb'),'YOUR_CONTENT_TYPE'))9]10標題 = {11'x-api-key': '您的 API 金鑰'12}1314response = requests.request("POST", url, headers=headers, data=payload, files=files)1516列印(回應.text)17
1匯入 請求23url = "https://api.quicknode.com/ipfs/rest/v1/s3/put-object"45payload = {'Key': 'YOUR_FILE_NAME',6'ContentType': 'YOUR_CONTENT_TYPE'}7files=[8('Body',('YOUR_FILE_NAME',open('YOUR_FILE_PATH','rb'),'YOUR_CONTENT_TYPE'))9]10標題 = {11'x-api-key': '您的 API 金鑰'12}1314response = requests.request("POST", url, headers=headers, data=payload, files=files)1516列印(回應.text)17
1需要 "uri"2需要 "net/http"34url = URI("https://api.quicknode.com/ipfs/rest/v1/s3/put-object")56https = 網::HTTP.new(url.主機, url.port)7https.use_ssl = true89請求 = 淨::HTTP::POST.new(網址)10請求["x-api-key"] = "您的 API 金鑰"11form_data = [['Body', File.open('YOUR_FILE_PATH')],['Key', 'YOUR_FILE_NAME'],['ContentType', 'YOUR_CONTENT_TYPE']]12request.set_form form_data, 'multipart/form-data'13回應 = https.請求(請求)14將回應。read_body15
1需要 "uri"2需要 "net/http"34url = URI("https://api.quicknode.com/ipfs/rest/v1/s3/put-object")56https = 網::HTTP.new(url.主機, url.port)7https.use_ssl = true89請求 = 淨::HTTP::POST.new(網址)10請求["x-api-key"] = "您的 API 金鑰"11form_data = [['Body', File.open('YOUR_FILE_PATH')],['Key', 'YOUR_FILE_NAME'],['ContentType', 'YOUR_CONTENT_TYPE']]12request.set_form form_data, 'multipart/form-data'13回應 = https.請求(請求)14將回應。read_body15