Skip to content

add with nocopy is still requiring path argument #5984

@mitra42

Description

@mitra42

Version information:

go-ipfs version: 0.4.18-
Repo version: 7
System version: amd64/darwin
Golang version: go1.11.1

Type: bug ?

Description:

URLs like

http://127.0.0.1:5001/api/v0/add?nocopy=true&arg=/Users/mitra/temp/archiveorg/commute/commute.mp4

Are failing with File argument 'path' is required

The docs unfortunately appear to be buggy [https://docs.ipfs.io/reference/api/http/#api-v0-add] says there is a required arg= parameter, but the curl example omits that, so I'm not sure to trust the docs, but it also says. Argument “path” is of file type. This endpoint expects a file in the body of the request as ‘multipart/form-data’. which is unclear, but suggests it needs the contents of the file supplied inline.

Apart from the bug in the docs (missing arg from example, or erroneously specified as a required argument), I think there is a bug where even if the path is supplied to arg=, and nocopy is provided, then it is still expecting content inline.

Its possible I'm misreading something, but there seem to be no examples anywhere surfacable with google of the HTTP API being used to add an url to filestore with nocopy=true

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions