mirror of
https://github.com/dutchcoders/transfer.sh.git
synced 2024-12-25 11:50:18 +01:00
improving error handling
This commit is contained in:
parent
d5c8c0320d
commit
09c9f4d866
2 changed files with 2 additions and 1 deletions
|
@ -348,6 +348,7 @@ func putHandler(w http.ResponseWriter, r *http.Request) {
|
|||
var err error
|
||||
|
||||
if err = storage.Put(token, filename, reader, contentType, uint64(contentLength)); err != nil {
|
||||
log.Printf("Error during save: %s", err.Error())
|
||||
http.Error(w, errors.New("Could not save file").Error(), 500)
|
||||
return
|
||||
}
|
||||
|
|
|
@ -164,7 +164,7 @@ func main() {
|
|||
|
||||
mime.AddExtensionType(".md", "text/x-markdown")
|
||||
|
||||
log.Printf("Transfer.sh server started. :%v using temp folder: %s", *port, config.Temp)
|
||||
log.Printf("Transfer.sh server started. :\nlistening on port: %v\nusing temp folder: %s\nusing storage provider: %s", *port, config.Temp, *provider)
|
||||
log.Printf("---------------------------")
|
||||
|
||||
s := &http.Server{
|
||||
|
|
Loading…
Reference in a new issue