ipfs / ipfs/kubo

Provide response body in the HTTP API for /api/v0/files/write endopint

Open
#7,403 2 comments 1 reaction 0 assignees View on GitHub
kind/enhancement need/maintainers-input topic/api topic/MFS topic/rpc-api
Dominant language
Go
Stars
17.1k
Forks
3.2k
Avg merge
3d 18h
Merged PRs (30d)
11

Description

Unlike [/api/v0/add](https://docs.ipfs.io/reference/http/api/#api-v0-add) endpoint that produces following response body on success:

```
{
"Bytes": "",
"Hash": "",
"Name": "",
"Size": ""
}
```

Endpoint for [`/api/v0/files/write`](https://docs.ipfs.io/reference/http/api/#api-v0-files-write) produces no results. Which happens to be at odds with js-ipfs `files.write` that returns `{cid, size}` pair.

There had being recent discussion about this mismatch between (See: https://github.com/ipfs/js-ipfs/pull/3055#issuecomment-636917239) HTTP-API and JS-IPFS API. While JS-IPFS could drop return value, I think it would be more useful to change HTTP-API to produce response body instead. I for one recall having to do two HTTP calls in the past to overcome this exact limitation.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.