|
|
@@ -196,11 +196,11 @@ func (s datasetMetaSearch) Less(i, j int) bool { |
|
|
|
return s.ID[i] < s.ID[j] |
|
|
|
} |
|
|
|
|
|
|
|
func GetDatasetAttachments(typeCloudBrain int, rels ...*Dataset) (err error) { |
|
|
|
return getDatasetAttachments(x, typeCloudBrain, rels...) |
|
|
|
func GetDatasetAttachments(typeCloudBrain int, isSigned bool, user *User, rels ...*Dataset) (err error) { |
|
|
|
return getDatasetAttachments(x, typeCloudBrain, isSigned, user, rels...) |
|
|
|
} |
|
|
|
|
|
|
|
func getDatasetAttachments(e Engine, typeCloudBrain int, rels ...*Dataset) (err error) { |
|
|
|
func getDatasetAttachments(e Engine, typeCloudBrain int, isSigned bool, user *User, rels ...*Dataset) (err error) { |
|
|
|
if len(rels) == 0 { |
|
|
|
return |
|
|
|
} |
|
|
@@ -243,6 +243,7 @@ func getDatasetAttachments(e Engine, typeCloudBrain int, rels ...*Dataset) (err |
|
|
|
return err |
|
|
|
} |
|
|
|
attachment.FileChunk = fileChunks[0] |
|
|
|
attachment.CanDel = CanDelAttachment(isSigned, user, attachment) |
|
|
|
sortedRels.Rel[currentIndex].Attachments = append(sortedRels.Rel[currentIndex].Attachments, attachment) |
|
|
|
} |
|
|
|
|
|
|
|