Skip to content

Unable to send to Remote #35

@bhoudebert

Description

@bhoudebert

Hi,

First of all, not really a bug but more of a lacking of how to achieve it.

We are trying to add something to IPFS with the library, using the remote part.

add is expecting a ByteString but there is no documentation of how to format that ByteString. Therefore it does not work and ask for the famous path argument (which is not even this name but error come from ipfs node anyway).

So how do we call the function add to provide the file name and also the encoding maybe?

res <- runRemote (add "blabla")

Anyway, I read the IPDS doc, still not clear to me.

curl --location --request POST 'http://localhost:5001/api/v0/add' \
--form 'myfile.txt="kkk"'
# returns
{
    "Name": "QmSj2KoTnMesarHGBRiWkh8TxqrwjgpayAmxLWFK56TEfc",
    "Hash": "QmSj2KoTnMesarHGBRiWkh8TxqrwjgpayAmxLWFK56TEfc",
    "Size": "11"
}

This is not totally working, uploaded to ipfs node but the name is trash and therefore cannot handle any directly I assume, still the content is "okay" with "kkk" as value.

I assume I am missing something for the Haskell part, thanks for any tips there (may offer you later a documentation PR + some free examples if you wish)

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