<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title><%= ENV.fetch("TRANSFER_MORE_TITLE", "File upload") %></title>
  <link rel="stylesheet" href="/css/bootstrap.min.css" />
  <!-- <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous" /> -->
  <!-- <link rel="stylesheet" href="//octicons.github.com/components/octicons/octicons/octicons.css"> -->
  <!-- <script src="/js/main.js"></script> -->
  <!-- <script src="/js/dropzone.js"></script> -->
  <link rel="shortcut icon" href="/images/favicon.ico" type="image/x-icon">
  <style type="text/css">
    body {
      text-align: center;
      font-family: Helvetica, Arial;
      font-size: 22px;
      color: #888;
      margin-top: 20px;
    }
    a {
      color: #66b;
      text-decoration: none;
    }
    #c {
      margin: 0 auto;
      width: 500px;
      text-align: left;
    }
    .dropzone {
      font-weight: bold;
      text-align: center;
      padding: 1em 0;
      margin: 1em auto;
      color: #555;
      border: 2px dashed #555;
      border-radius: 6px;
      cursor: default;
      height: 400px;
      max-width: 400px;
      background-color: rgba(250, 166, 180, 0.5);
      background-repeat: no-repeat;
      background-position: bottom;
    }
    #dropzone.hover {
      color: #eaa
      border-color: #eaa;
      border-style: solid;
      box-shadow: inset 0 4px 4px #888;
    }
    footer {
      width: 100%;
      display: flex;
      justify-content: space-between;
      padding: 1em;
    }
  </style>
</head>

<body>
  <h2><%= ENV.fetch("TRANSFER_MORE_TITLE", "File upload") %></h2>
  <% if !file_url.empty? %>
    <div class="alert alert-success">
      <p>Upload url: <a href="<%= file_url %>"><%= file_url %></a></p>
    </div>
  <% end %>

  <p>
    <code>
      curl --progress-bar --upload-file file.ext  <%= TransferMore.base_url(env) %>/file.ext
    </code>
  </p>


  <form method="POST" action="/" enctype="multipart/form-data">
    <div class="form-group">
      <div class="dropzone-bg">
        <input name="commit" value="Upload" class="btn btn-primary" type="submit">
        <input class="form-control dropzone" name="file" id="file" type="file" required>Drop files</input>
      </div>
    </div>
  </form>

  <footer>
    <span>
      <%= ENV.fetch("TRANSFER_MORE_FOOTER", "built by <a href=\"https://git.sceptique.eu/Sceptique\">Sceptique</a>, powered with <a href=\"http://kemalcr.com/\">kemal</a>") %>
    </span>
    <span>
      <a href="https://git.sceptique.eu/Sceptique/transfer_more">Fork or patch me</a>
    </span>
  </footer>
</body>
</html>
