       {_title, _url} -> napkin_params
     end
   end
+
+  defp bucket do
+    Application.get_env(:beer_napkin, :s3_bucket)
+  end
+
+  defp s3_host do
+    Application.get_env(:beer_napkin, :s3_host)
+  end
 end

  def update(conn, %{"id" => id, "napkin" => napkin_params, "napkin_image" => image}) do
    case load_napkin(conn, id) do
      {:ok, napkin} ->
        update_image(napkin, image, napkin.token)
        update_params = Map.take(napkin_params, [
          "json", "repository_full_name", "issue_title", "issue_description"
        ])

  use BeerNapkin.Web, :controller
  plug :authenticate
  alias BeerNapkin.Napkin

  def new(conn, _params) do
    changeset = Napkin.changeset(%Napkin{})
