[Streemian] Automatic IPFS upload bot

in #steem-bots8 years ago

Streemian.com is pleased to announce one of the first functional bots that adds value to Steem: The IPFS.pics bot!

What does it do?

Whenever someone posts a new picture using the proper markdown syntax, this bot will download the picture and add it to the InterPlanetary Filesystem (IPFS).
It currently uses ipfs.pics but we will sooner or later deploy our own delivery network.

What is IPFS?

The InterPlanetary File System (IPFS) is a new hypermedia distribution protocol, addressed by content and identities. IPFS enables the creation of completely distributed applications. It aims to make the web faster, safer, and more open.

It is an open source project developed by the IPFS Community and many contributors from the open source community.

How does it work?

A bot (streemian) is running that inspects every post made on the Steem network and searches for the markdown syntax for adding pictures (see example below).
If it found a picture, it will try to obtain it through the provided links, store it on IPFS and post a permanent comment of the following form:

original:    http://imgs.xkcd.com/comics/exploits_of_a_mom.png
description: enter image description here
ipfs-hash:   QmW3FgNGeD46kHEryFUw1ftEUqRw254WkKxYeKaouz7DJA
ipfs.pics:   //ipfs.pics/ipfs/QmW3FgNGeD46kHEryFUw1ftEUqRw254WkKxYeKaouz7DJA

How to help?

Since Steem is bandwidth limited, the streemian account could need some love to improve its bandwidth. You could help us with that by simply upvoting this post, or any post made by this bot.

Cheers

Sort:  

I believe that we need to add a new feature. The ability to post a comment whose author can disable the potential for payouts and / or replies. So long as a comment has the potential for a payout the post must be displayed.

I love this kind of innovation and service. I think we could really take this to the next level if you offered the ability to fetch the image from the URL. Then steemit.com could simply point at:

https://yourdomain.com/image?u=imgs.xkcd.com/comics/exploits_of_a_mom.png

This would enable non IPFS images to be used.

Also, I think some of that data is redundant (ipfs-hash and ipfs.pics) so you may want to save blockchain space.

As a community we can archive all images on IPFS by hosting IPFS nodes that white list images on Steem with positive upvotes. In this way the IPFS hosting providers can be protected from child porn and other illegal images by the Steem curation process.

Constructing such a general urlrewrite an using it to automatically store stuff on steemit is not a problem to do.
The issue is (as you know) the content delivery. BUT, we could build a network of IPFS content delivery networks that can be instantly replaced or load balanced if we had the IPFS-hash already. If steemit.com allowed to upload pictures, you would have that hash and could seed the file in the IPFS network.
This is how I think it can be done:

  • User uploads content on steemit.com (similar to ipfs.pics)
  • Steemit.com puts the stuff on IPFS and merely uses the IPFS hash in the post ~[ipfs:HASH]
  • People browsing the steemit.com page will see an <a> tag with href to https://mirror-providerA.steemit.com/?=HASH
  • Steemit could pay people for delivery (though it requires some trust as the deliverer cannot know how oftern you showed their link to the users)

Well, incentivise people to host IPFS nodes is not easy (as you know) .. no money involved :(

I guess you could ask witnesses to host such nodes. They already kind of have to host a seed node, why not ask an IPFS node from them too? At the moment, the pay largely compensates for it. More generally, I believe that a network supporting a DAO will need various types of specialized nodes to efficiently provide the functionality offered by the DAO, and this should be payed by the network itself. We already have witness nodes, seed nodes, now IPFS nodes, I can see more popping up in the future. I'm sure we can find a way to pay for all of them while avoiding abuse / theft of funds at the same time.

How about a Steem plugin for browsers?

They could simply try to fetch
https://yourdomain.com/ipfs?u=imgs.xkcd.com/comics/exploits_of_a_mom.png
(note the ipfs)
and the service would simply return the IPFS hash. The browser plugin that redirects to one out of many IPFS providers to actually get the file.

Can this bot make imgur images visible on Steem?

The idea of this bot is to put the IPFS hash next to the post that contained the image .. until Steemit does IPFS automatically

I just saved an imgur pic and uploaded it to ipfs and posted the link given back by ipfs.
The pic doesn't appear automatically in place of the link like other pics.

  • The bot cannot change your posts
  • the bot merely uploads your pic into ipfs (currently via ipfs.pics) and gives you a hash and link It will not show the picture

I understood that. What I meant to say was that Steem wasn't converting the link to a pic automatically like it converts the youtube link to a video at the post automatically. May be Steem is still working on it?

I found that you have to load and right click on the ipfs pic and get its final location, and that https://ipfs.pics/ipfs/filename link will display here.

Cool, Thanks a lot.

The OP can change the image url in his post to the path the bot posted in its reply, but it won't happen automatically.

Ok, Do I have to installed IPFS at my computer for the bot to work with my post?

Nop. Nothing needs to be done from your side of things. Just post an image and it will give you an IPFS hash (and upload it to ipfs.pics)

pleased to announce one of the first functional bots that adds value to Steem:

I don't get it. How does this benefit Steem? If you were to provide a link to the Steemit post in the comments, then I could identify a purpose for this, otherwise ... not so much. Sorry, perhaps I'm missing the point, which is not unlikely.

He must have left that out. Unless the link is deposited as a reply in the Post with the offending picture, this would be pointless.

A link to perform the script action would be less wasteful. Auto uploading to ipfs might bloat their network with unused images and get this domain banned.

So whilst I think this is a really great proof of concept and a good and innovative idea to bring to Steemit, I do think that the bot is currently not serving a useful way to switch over to IPFS hosting other than to make users aware that it's possible, and unfortunately these messages are starting to become spammy:

https://steemit.com/steem/@tuck-fheman/can-the-streemian-bot-stop-spamming-plez

I've commented in there a way in which we can turn this in to something a little more useful for the community and a little more opt-in.

I really think this idea has legs, and IPFS as a defacto image hosting solution sounds like a really great idea - I'm certainly interested in helping!

On a side note, is the code for the bot open sourced anywhere?

Here is an Archive of Cryptocurrency App building Code on Github for anyone creating a Steemit app
https://steemit.com/steem/@marsresident/github-cryptocurrency-app-creation-archive

NICE! Up and running! Great!

This post have something extraordinary things, i never saw this type of post really awesome

Coin Marketplace

STEEM 0.15
TRX 0.16
JST 0.028
BTC 67340.80
ETH 2419.68
USDT 1.00
SBD 2.35