diff --git a/model/sharing/upload.go b/model/sharing/upload.go index 4da7292b531..f770077bece 100644 --- a/model/sharing/upload.go +++ b/model/sharing/upload.go @@ -224,6 +224,11 @@ func (s *Sharing) findNextFileToUpload(inst *instance.Instance, since string) (m Warnf("missing results for bulk get %v", query) return nil, 0, since, ErrInternalServerError } + if results[0]["_deleted"] == true { + inst.Logger().WithNamespace("upload"). + Warnf("cannot upload _deleted file %v", results[0]) + return nil, 0, since, ErrInternalServerError + } return results[0], int(idx), since, nil } return nil, 0, since, nil