-
Notifications
You must be signed in to change notification settings - Fork 11
Add a file using api #131
Comments
@harshetha I am not able to see your comment. I think your response can help a lot to solve this issue. Thanks in advance |
I am working on a web scenario where I have to upload a file into ipfs and On Thu, Jun 9, 2016 at 3:29 AM, aniket-kumar [email protected]
|
I have tried multiple approaches found from anywhere but none of them is working to upload a file. Yeah, i come to learn how to upload text only. I don't know if any api of ipfs is made for this purpose. |
Can I see how you uploaded text? Maybe I can add some commands and combine On Thu, Jun 9, 2016 at 10:14 AM, aniket-kumar [email protected]
|
I just followed this : let me know about any progress... :) |
I have tried this before but it did not work for me, can I see your code Thanks On Fri, Jun 10, 2016 at 2:14 AM, aniket-kumar [email protected]
|
I also think I know how to integrate the file upload with ipfs but having a On Fri, Jun 10, 2016 at 9:55 AM, Harshetha Sundar <
|
It was also not working on my system but when i uploaded it to ipfs and executed it from ipfs then it worked for me. Try that. Follow all the steps given in that link till 4th one. |
@harshetha any progress? |
No, the issue is that the files.add function is not yet implemented in the On Mon, Jun 13, 2016 at 7:33 AM, aniket-kumar [email protected]
|
yeah, you are right. I was also thinking same. |
I am also trying out this On Mon, Jun 13, 2016 at 10:09 AM, aniket-kumar [email protected]
|
ok, let me know about any progress...go ahead |
@diasdavid Can you answer this? |
You can upload a file to IPFS using the Try first using https://github.com/ipfs/js-ipfs-api and the go-ipfs daemon and let me know of your results. Note that you will have to set the CORS headers this way https://github.com/ipfs/js-ipfs-api#cors |
@diasdavid i tried this js-ipfs-api. It is working fine for ipfs.id but when i tried to use ipfs.add("string").then(callback) , it showed the error : Uncaught TypeError: ipfs.add is not a function |
@aniket-kumar, try with |
@diasdavid now new error : |
@harshetha @RichardLitt @diasdavid any new findings? |
I'm trying to do the same thing. If I understand correctly, Also, is there any difference between |
ipfs-js is node.js only I guess. If we could not write/move/copy/delete files from web browser in a way, how would ipfs be useful to anyone other than showing static web pages. |
You have two different ways of using the
Or use it with promises:
It's mentioned in the readme over here: https://github.com/ipfs/js-ipfs-api#callbacks-and-promises
Yes, it works in the browser as well. You have some examples here: https://github.com/ipfs/js-ipfs-api/tree/master/examples
No, it's merely there to fulfill the interface we defined in https://github.com/ipfs/interface-ipfs-core/ while remaining backwards compatibility. @norzak No, js-ipfs works in the browser as well. There are examples in the repository itself (here: https://github.com/ipfs/js-ipfs/tree/master/examples) and I've also made an example for passing around data you can check out here: https://github.com/VictorBjelkholm/js-ipfs-passing-data I'm gonna close this issue, and refer to future readers to open up issues in the appropriate repository if you're having any troubles with either js-ipfs or js-ipfs-api |
We are leaving issues open in FAQ repo so they are more easily visible. |
This issue was moved to https://discuss.ipfs.io/t/add-a-file-using-api/278 |
hi can anyone give a solution to this.. GET /frontend/css/bootstrap.min.css.map 404 2.993 ms - - |
I want to create a webpage in which user will upload a file and that file will be uploaded on ipfs and i will get the hash of file internally. I think i can do this using the apis of ipfs but i didn't get any particular documentation of ipfs apis. Tell me, How can i solve this purpose?
The text was updated successfully, but these errors were encountered: