mirror of
https://github.com/dutchcoders/transfer.sh.git
synced 2024-11-26 22:20:18 +01:00
updated readme & go formatted code
This commit is contained in:
parent
16ad1833d2
commit
b8eaf23805
4 changed files with 92 additions and 91 deletions
|
@ -1,6 +1,8 @@
|
|||
# transfer.sh
|
||||
|
||||
Easy and fast file sharing from the command-line. This code contains the server with everything you need to create your own instance. Transfer.sh currently runs on top of Amazon S3. Other storage types will be added shortly.
|
||||
Easy and fast file sharing from the command-line. This code contains the server with everything you need to create your own instance.
|
||||
|
||||
Transfer.sh support currently the s3 (Amazon S3) provider and local file system (local).
|
||||
|
||||
[![Build Status](https://travis-ci.org/dutchcoders/transfer.sh.svg?branch=master)](https://travis-ci.org/dutchcoders/transfer.sh)
|
||||
|
||||
|
|
|
@ -38,19 +38,19 @@ import (
|
|||
"github.com/golang/gddo/httputil/header"
|
||||
"github.com/gorilla/mux"
|
||||
"github.com/kennygrant/sanitize"
|
||||
html_template "html/template"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"strconv"
|
||||
"log"
|
||||
"math/rand"
|
||||
"mime"
|
||||
"net/http"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
html_template "html/template"
|
||||
text_template "text/template"
|
||||
"time"
|
||||
)
|
||||
|
||||
func healthHandler(w http.ResponseWriter, r *http.Request) {
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"io"
|
||||
"github.com/goamz/goamz/s3"
|
||||
"strconv"
|
||||
"fmt"
|
||||
"github.com/goamz/goamz/s3"
|
||||
"io"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
type Storage interface {
|
||||
|
@ -23,7 +23,6 @@ func NewLocalStorage(basedir string) (*LocalStorage, error) {
|
|||
return &LocalStorage{basedir: basedir}, nil
|
||||
}
|
||||
|
||||
|
||||
func (s *LocalStorage) Get(token string, filename string) (reader io.ReadCloser, contentType string, contentLength uint64, err error) {
|
||||
path := filepath.Join(s.basedir, token, filename)
|
||||
|
||||
|
|
Loading…
Reference in a new issue