diff --git a/router/router_server_files.go b/router/router_server_files.go index 5384049..3729e97 100644 --- a/router/router_server_files.go +++ b/router/router_server_files.go @@ -202,6 +202,13 @@ func postServerCompressFiles(c *gin.Context) { return } + if !s.Filesystem.HasSpaceAvailable() { + c.AbortWithStatusJSON(http.StatusConflict, gin.H{ + "error": "This server does not have enough available disk space to generate a compressed archive.", + }) + return + } + f, err := s.Filesystem.CompressFiles(data.RootPath, data.Paths) if err != nil { TrackedServerError(err, s).AbortWithServerError(c)