To clean some code up in the Server class, the Server.upload method should pass the uploaded archive to a UploadHandler class which will determine the appropriate extraction method and then validate the temp.
This can make the code in Server.upload cleaner and remove the need for the Server.validateZip method as all files will be handled in the Upload Handler.
If the uploaded file is not a supported format, the UploadHandler can return similar messages as to the ones that exist in the Server.upload() method.
Code Cleaning
To clean some code up in the Server class, the Server.upload method should pass the uploaded archive to a UploadHandler class which will determine the appropriate extraction method and then validate the temp.
This can make the code in Server.upload cleaner and remove the need for the Server.validateZip method as all files will be handled in the Upload Handler.
If the uploaded file is not a supported format, the UploadHandler can return similar messages as to the ones that exist in the Server.upload() method.