Twitter Fileshare, a lightweight Ruby Sinatra app to seed files to Twitter.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Twitter Fileshare

Sinatra application to seed files to Twitter through byte string, Base64 encode, or plain text tweets. Great for transmitting text files, images, and other important files.

Why Twitter Fileshare

Governments and private organizations continue to lock down legitimate file sharing through raids, law suits, and “consumer protection” laws & treaties, mainly targeting those who pirate movies, music, and software through BitTorrent and other underground distribution methods. But anyone that knows just a little bit about technology knows file sharing can be done through any medium. This began with Usenet groups, where the binary data was converted to text characters and reprocessed for download. This began one of the first methods of photo sharing. Facsimile machines follow a similar method of dissemination of binary data. And even ham radio used teletype to transmit photos across long distances by converting photos to ASCII before transmission.

Today, we have advanced systems built for sharing files: websites, FTP, BitTorrent, email, CD/DVDs, hard drives. We also have many systems today that mirror prior technology of Usenet newsgroups, paging devices, IRC chat rooms, and IM status messages, of which the largest modern equivalent today is Twitter.

If Twitter is today’s Usenet and Usenet was used for file sharing years ago, why can’t Twitter be utilized today for file sharing?

Project by Greg Leuch and Theo Watson. A Free Art & Technology Lab project.

How to Install

Installation of Twitter Fileshare is straightforward by following the instructions below.

  • Grab the repo: git://
  • Install bundler via gem install bundler
  • Make your tmp and log folders: mkdir tmp log
  • Make your tweetable files folder and Base64 temp folders (outside of the repo folder). Ensure your temp folder has full (777) permissions.
  • Copy to (cp and customize as desired.
  • Copy settings.yml.default to settings.yml (cp settings.yml.default settings.yml) and customize your settings, install path, database connection, and more.
    • NB: If using other than mysql, update your Gemfile for the required adapter.
  • Run bundle install to install all required gems.

How to Run

  • Create a new Twitter account.
  • Create a Twitter application.
    • Set Application Type to “Browser”.
    • Callback URL is
    • Access Type is “Read & Write Access”
    • Check the box for using Twitter for login.
  • Update the settings.yml file’s Twitter oAuth token and secret with the one Twitter created for your new app.
    • Be sure to create a different launch code and replace that code in the cron job below!
  • Restart your app using touch tmp/restart.txt.
  • Sync your Twitter account to the application by going to the admin section (
  • Create folder specified for files in your settings.yml and add files.
  • Setup a cron job to run every minute.
    • */1 * * * * wget -q >/dev/null 2>&1
  • Go into the admin section and queue up the file you want sent via the Twitter account(s) you have synced.
  • Watch the Twitter fileshare magic happen!


  • Make script for fetching contents from Twitter.


  • Twitter allows a max of 1,000 tweets per account per day. Don’t be alarmed if your account stops tweeting during certain parts of the day.
  • With DataMapper > 0.10.0, you may get a NoMethodError on ‘find_by_sql’. To fix, install the dm-ar-finders gem.