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

ipfs api calls #12

Closed
whyrusleeping opened this issue Oct 23, 2015 · 10 comments
Closed

ipfs api calls #12

whyrusleeping opened this issue Oct 23, 2015 · 10 comments
Assignees

Comments

@whyrusleeping
Copy link

Hey guys!
I was reading through a bit of code, and I think you guys would be better off using the javascript ipfs api bindings instead of calling a fairly costly exec. Could probably speed things up a bit for you (as well as be safer than calling exec).

If you need any help integrating that feel free to ping us in irc or here!

@joelgallant
Copy link

👍

@cloutier
Copy link
Member

I think I should deprecate server.js instead and use ipfs web apis in PHP. It would be simpler for other people to install ipfs.pics on their own servers without any node.js.

@whyrusleeping Do you know if there are php api bindings or should I write my own?

@cloutier cloutier self-assigned this Oct 23, 2015
@MichaelMure
Copy link

ipfs/ipfs#83

The answer seems to be no.

@cloutier
Copy link
Member

@MichaelMure Thanks!

I'm going to write my own. I'll keep it in a separate module to help people who want to reuse it.

@cloutier
Copy link
Member

@whyrusleeping I am having trouble implementing ipfs add. I tried:

http://127.0.0.1:5001/api/v0/add?arg=/home/Vincent/Pictures/test/test.png
http://127.0.0.1:5001/api/v0/add?path=/home/Vincent/Pictures/test/test.png
http://127.0.0.1:5001/api/v0/add/home/Vincent/Pictures/test/test.png

I always get this error:

File argument 'path' is required

@cloutier
Copy link
Member

@whyrusleeping Nevermind, I was doing it wrong.

@cloutier
Copy link
Member

cloutier commented Nov 9, 2015

Thanks for the suggestion, ipfs.pics is now much faster and the code is more readable! 👍

I only implemented the subset of ipfs commands we needed, if someone needs a particuliar command, it would be my pleasure to add it. Just ping me.

@cloutier cloutier closed this as completed Nov 9, 2015
@cloutier
Copy link
Member

cloutier commented Nov 9, 2015

@arvidj : With this the upload folder is not needed anymore. I've removed this step in the wiki.

@shgandhi
Copy link

@cloutier : I am getting the same error File argument 'path' is required when implementing ipfs add. Can you please point the right way for doing that?

@cloutier
Copy link
Member

Sure!

If I remember right (it's been a while), I had the same error until I added the stream-channels=true.

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

5 participants