|
|
@@ -87,7 +87,7 @@ func InsertFileChunk(fileChunk *FileChunk) (_ *FileChunk, err error) { |
|
|
|
return fileChunk, nil |
|
|
|
} |
|
|
|
|
|
|
|
// UpdateAttachment updates the given attachment in database |
|
|
|
// UpdateFileChunk updates the given file_chunk in database |
|
|
|
func UpdateFileChunk(fileChunk *FileChunk) error { |
|
|
|
return updateFileChunk(x, fileChunk) |
|
|
|
} |
|
|
@@ -98,3 +98,13 @@ func updateFileChunk(e Engine, fileChunk *FileChunk) error { |
|
|
|
_, err := sess.Cols("is_uploaded").Update(fileChunk) |
|
|
|
return err |
|
|
|
} |
|
|
|
|
|
|
|
// DeleteFileChunk delete the given file_chunk in database |
|
|
|
func DeleteFileChunk(fileChunk *FileChunk) error { |
|
|
|
return deleteFileChunk(x, fileChunk) |
|
|
|
} |
|
|
|
|
|
|
|
func deleteFileChunk(e Engine, fileChunk *FileChunk) error { |
|
|
|
_, err := e.ID(fileChunk.ID).Delete(fileChunk) |
|
|
|
return err |
|
|
|
} |