Skip to content

Commit

Permalink
Add option in config to disable tus (#759)
Browse files Browse the repository at this point in the history
  • Loading branch information
ishank011 authored May 19, 2020
1 parent 251ceef commit 96deb18
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions internal/http/services/dataprovider/dataprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@ func init() {
}

type config struct {
Prefix string `mapstructure:"prefix"`
Driver string `mapstructure:"driver"`
Drivers map[string]map[string]interface{} `mapstructure:"drivers"`
Prefix string `mapstructure:"prefix"`
Driver string `mapstructure:"driver"`
Drivers map[string]map[string]interface{} `mapstructure:"drivers"`
DisableTus bool `mapstructure:"disable_tus"`
}

type svc struct {
Expand Down Expand Up @@ -107,7 +108,7 @@ type Composable interface {

func (s *svc) setHandler() (err error) {
composable, ok := s.storage.(Composable)
if ok {
if ok && !s.conf.DisableTus {
// A storage backend for tusd may consist of multiple different parts which
// handle upload creation, locking, termination and so on. The composer is a
// place where all those separated pieces are joined together. In this example
Expand Down

0 comments on commit 96deb18

Please sign in to comment.