[bum reva] Fix 0-byte file uploads
This commit is contained in:
+1
-1
@@ -75,7 +75,7 @@ var tl = TemplateList{
|
||||
|
||||
func addTemplateInfo(mt *appregistry.MimeTypeInfo, apps []*ProviderInfo) {
|
||||
for _, app := range apps {
|
||||
if tls, ok := tl.Templates[strings.ToLower(app.Name)]; ok {
|
||||
if tls, ok := tl.Templates[strings.ToLower(app.ProductName)]; ok {
|
||||
for _, tmpl := range tls {
|
||||
if tmpl.Extension != "" && tmpl.Extension == mt.Ext {
|
||||
app.TargetExt = tmpl.TargetExtension
|
||||
|
||||
+1
@@ -197,6 +197,7 @@ func (s *svc) handleTusPost(ctx context.Context, w http.ResponseWriter, r *http.
|
||||
}
|
||||
switch tfRes.Status.Code {
|
||||
case rpc.Code_CODE_OK:
|
||||
w.Header().Set(net.HeaderLocation, "")
|
||||
w.WriteHeader(http.StatusCreated)
|
||||
return
|
||||
case rpc.Code_CODE_ALREADY_EXISTS:
|
||||
|
||||
Reference in New Issue
Block a user