Tweetbot custom media endpoint for uploads to S3, written in Go. Heavily influenced by s3itch.
See the Environment Variables section below for help with the configuration options.
Configure the buildpack
If you're creating a new heroku app, set the buildpack on creation:
heroku create -b https://github.com/heroku/heroku-buildpack-go.git --region=eu
For an existing Heroku app, set the
heroku config:set BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-go.git
Set environment variables
GoMedia uses environment variables for configuration (see all available options below).
Before pushing to Heroku, you should at the very least set the required options, e.g.
heroku config:set AWS_ACCESS_KEY_ID="…" AWS_SECRET_ACCESS_KEY="…" \ AWS_REGION="eu-west-1" BUCKET_NAME="mybucket"
It is highly recommended that you also set a username and password (for the obvious reasons).
Push to Heroku
git push heroku master
Environment Variables / Configuration
AWS_ACCESS_KEY_ID— (required) self-explanatory
AWS_SECRET_ACCESS_KEY— (required) self-explanatory
AWS_REGION— (optional) the AWS region. Defaults to
BUCKET_NAME— (required) the name of your S3 bucket
BASE_URL— (optional) the base URL for generated URLs (no trailing slash)
- Defaults to the bucket url (e.g.
- If you're using a custom CNAME (or a CDN) set it to the hostname (beginning with http or https)
- Defaults to the bucket url (e.g.
HTTP_PASSWORD— (recommended) protect the upload endpoints with basic auth
HTTP_USER— (recommended) protect the upload endpoints with basic auth
AIRBRAKE_API_KEY— (optional) set this to your Airbrake API key if you want airbrake support
AIRBRAKE_ENDPOINT— (optional) configure this if you use Errbit (or some other custom endpoint)
AIRBRAKE_ENVIRONMENT— (optional) set the environment for Airbrake, defaults to
Use with Tweetbot
GoMedia works as a Custom Media Upload endpoint for Tweetbot (both iOS and OS X).
All you need to do is set the custom endpoint URL to:
PASSWORD with your own credentials and
MYAPPNAME with your Heroku app name…
Use with Monosnap
For monosnap you need to configure a WebDAV endpoint with the app URL and credentials. Do not set the port!
You need to configure the Base URL in Monosnap regardless of whether you're using a custom base URL or not.
With Monosnap it is recommended to add
%R to the filename template because the filename cannot be altered server side (thus there's a small chance that the filename will conflict with an existing file in the bucket).
There is no documentation for this package.
goamz - Go packages to interact with the Amazon Web Services.
|goamz - Go packages to interact with the Amazon Web Services.|
Package base58 implements a human-friendly base58 encoding.
|Package base58 implements a human-friendly base58 encoding.|
Package goji provides an out-of-box web server with reasonable defaults.
|Package goji provides an out-of-box web server with reasonable defaults.|
Package bind provides a convenient way to bind to sockets.
|Package bind provides a convenient way to bind to sockets.|
Command example is a sample application built with Goji.
|Command example is a sample application built with Goji.|
Package graceful implements graceful shutdown for HTTP servers by closing idle connections after receiving a signal.
|Package graceful implements graceful shutdown for HTTP servers by closing idle connections after receiving a signal.|
Package listener provides a way to incorporate graceful shutdown to any net.Listener.
|Package listener provides a way to incorporate graceful shutdown to any net.Listener.|
Package web implements a fast and flexible middleware stack and mux.
|Package web implements a fast and flexible middleware stack and mux.|
Package middleware provides several standard middleware implementations.
|Package middleware provides several standard middleware implementations.|
Package mutil contains various functions that are helpful when writing http middleware.
|Package mutil contains various functions that are helpful when writing http middleware.|