Conditionally include creation-defer-length if the composer supports it
This commit is contained in:
parent
0976863947
commit
d545b6518b
|
@ -119,13 +119,16 @@ func NewUnroutedHandler(config Config) (*UnroutedHandler, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Only promote extesions using the Tus-Extension header which are implemented
|
// Only promote extesions using the Tus-Extension header which are implemented
|
||||||
extensions := "creation,creation-with-upload,creation-defer-length"
|
extensions := "creation,creation-with-upload"
|
||||||
if config.StoreComposer.UsesTerminater {
|
if config.StoreComposer.UsesTerminater {
|
||||||
extensions += ",termination"
|
extensions += ",termination"
|
||||||
}
|
}
|
||||||
if config.StoreComposer.UsesConcater {
|
if config.StoreComposer.UsesConcater {
|
||||||
extensions += ",concatenation"
|
extensions += ",concatenation"
|
||||||
}
|
}
|
||||||
|
if config.StoreComposer.UsesLengthDeferrer {
|
||||||
|
extensions += ",creation-defer-length"
|
||||||
|
}
|
||||||
|
|
||||||
handler := &UnroutedHandler{
|
handler := &UnroutedHandler{
|
||||||
config: config,
|
config: config,
|
||||||
|
|
Loading…
Reference in New Issue