Provide response body in the HTTP API for /api/v0/files/write endopint
- 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
Assessment
This issue has not been assessed yet.