🐛 Fix check reupload condition
This commit is contained in:
parent
6cda5751df
commit
d0927b5528
@ -95,7 +95,7 @@ func CheckChunkExistsInTemporary(meta models.Attachment, cid string) bool {
|
||||
}
|
||||
|
||||
func ReUploadFileToPermanent(meta models.Attachment, dst int) error {
|
||||
if dst == models.AttachmentDstTemporary || meta.Destination != dst {
|
||||
if dst == models.AttachmentDstTemporary || meta.Destination == dst {
|
||||
return fmt.Errorf("destnation cannot be reversed temporary or the same as the original")
|
||||
}
|
||||
if meta.Destination != models.AttachmentDstTemporary {
|
||||
|
Loading…
Reference in New Issue
Block a user