remove s3 from client
This commit is contained in:
@@ -317,10 +317,19 @@ func (s *Server) HandleUploadStream(w http.ResponseWriter, r *http.Request) {
|
||||
log.Printf("Error saving snapshot metadata: %v", err)
|
||||
}
|
||||
|
||||
// Run rotation after successful upload
|
||||
deletedCount, reclaimedBytes := s.rotateSnapshots(clientID)
|
||||
if deletedCount > 0 {
|
||||
log.Printf("Rotation: deleted %d snapshots, reclaimed %.2f MB for client %s",
|
||||
deletedCount, float64(reclaimedBytes)/(1024*1024), clientID)
|
||||
}
|
||||
|
||||
respondJSON(w, http.StatusOK, map[string]interface{}{
|
||||
"success": true,
|
||||
"message": "Snapshot uploaded successfully",
|
||||
"size": actualSize,
|
||||
"success": true,
|
||||
"message": "Snapshot uploaded successfully",
|
||||
"size": actualSize,
|
||||
"deleted_count": deletedCount,
|
||||
"reclaimed_bytes": reclaimedBytes,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user