feat: 添加内容置顶功能,更新相关数据模型和前端视图
This commit is contained in:
@@ -101,7 +101,7 @@ func (s *common) InitUpload(ctx context.Context, userID int64, form *common_dto.
|
||||
localPath = "./storage"
|
||||
}
|
||||
tempDir := filepath.Join(localPath, "temp", uploadID)
|
||||
if err := os.MkdirAll(tempDir, 0755); err != nil {
|
||||
if err := os.MkdirAll(tempDir, 0o755); err != nil {
|
||||
return nil, errorx.ErrInternalError.WithCause(err)
|
||||
}
|
||||
|
||||
@@ -205,7 +205,7 @@ func (s *common) CompleteUpload(ctx context.Context, userID int64, form *common_
|
||||
}
|
||||
|
||||
hash := hex.EncodeToString(hasher.Sum(nil))
|
||||
dst.Close(); // Ensure flush before potential removal
|
||||
dst.Close() // Ensure flush before potential removal
|
||||
os.RemoveAll(tempDir)
|
||||
|
||||
// Deduplication Logic (Similar to Upload)
|
||||
|
||||
Reference in New Issue
Block a user