Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to send to Remote #35

Open
bhoudebert opened this issue Mar 6, 2022 · 1 comment
Open

Unable to send to Remote #35

bhoudebert opened this issue Mar 6, 2022 · 1 comment

Comments

@bhoudebert
Copy link

bhoudebert commented Mar 6, 2022

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)

@github-actions
Copy link

github-actions bot commented Mar 6, 2022

Thank you for submitting an issue! It means a lot that you took the time -- it helps us be better 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant