🐛 Trying fix deleting attachment issue
This commit is contained in:
@@ -3,7 +3,6 @@ package services
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"git.solsynth.dev/hypernet/nexus/pkg/nex/sec"
|
||||
"math"
|
||||
"mime"
|
||||
"mime/multipart"
|
||||
@@ -11,6 +10,8 @@ import (
|
||||
"path/filepath"
|
||||
"time"
|
||||
|
||||
"git.solsynth.dev/hypernet/nexus/pkg/nex/sec"
|
||||
|
||||
"github.com/eko/gocache/lib/v4/cache"
|
||||
"github.com/eko/gocache/lib/v4/marshaler"
|
||||
"github.com/eko/gocache/lib/v4/store"
|
||||
@@ -251,7 +252,7 @@ func DeleteAttachment(item models.Attachment) error {
|
||||
tx.Commit()
|
||||
|
||||
if dat.RefCount == 0 {
|
||||
PublishDeleteFileTask(dat)
|
||||
go DeleteFile(dat)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
Reference in New Issue
Block a user