nlanson / Yomi

Self-hosted manga server and accompanying web app.
3 stars 0 forks source link

Upload Handler #14

Closed nlanson closed 3 years ago

nlanson commented 3 years ago

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.

nlanson commented 3 years ago

f33120c