cli: Print out available tus extensions
This commit is contained in:
parent
d01d878e29
commit
241c458184
|
@ -54,7 +54,7 @@ func Serve() {
|
||||||
SetupHookMetrics()
|
SetupHookMetrics()
|
||||||
}
|
}
|
||||||
|
|
||||||
stdout.Printf(Composer.Capabilities())
|
stdout.Printf("Supported tus extensions: %s\n", handler.SupportedExtensions())
|
||||||
|
|
||||||
// Do not display the greeting if the tusd handler will be mounted at the root
|
// Do not display the greeting if the tusd handler will be mounted at the root
|
||||||
// path. Else this would cause a "multiple registrations for /" panic.
|
// path. Else this would cause a "multiple registrations for /" panic.
|
||||||
|
|
|
@ -155,6 +155,13 @@ func NewUnroutedHandler(config Config) (*UnroutedHandler, error) {
|
||||||
return handler, nil
|
return handler, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SupportedExtensions returns a comma-separated list of the supported tus extensions.
|
||||||
|
// The availability of an extension usually depends on whether the provided data store
|
||||||
|
// implements some additional interfaces.
|
||||||
|
func (handler *UnroutedHandler) SupportedExtensions() string {
|
||||||
|
return handler.extensions
|
||||||
|
}
|
||||||
|
|
||||||
// Middleware checks various aspects of the request and ensures that it
|
// Middleware checks various aspects of the request and ensures that it
|
||||||
// conforms with the spec. Also handles method overriding for clients which
|
// conforms with the spec. Also handles method overriding for clients which
|
||||||
// cannot make PATCH AND DELETE requests. If you are using the tusd handlers
|
// cannot make PATCH AND DELETE requests. If you are using the tusd handlers
|
||||||
|
|
Loading…
Reference in New Issue