The md5 generator now checks if the file already exists on the file system and would either allow the upload to go through or not depending on the overwrite variable in it's constructor is configured.
I also removed duplicated codes.... new File() could be found more than once in the FileUpload class plus a new method doesFileExists for the file-system.
Lastly, i figured a way to reduce method parameter bloat by introducing getters for the path resolver, filesystem objects in the FileUpload class
The md5 generator now checks if the file already exists on the file system and would either allow the upload to go through or not depending on the
overwrite
variable in it's constructor is configured.I also removed duplicated codes....
new File()
could be found more than once in theFileUpload
class plus a new methoddoesFileExists
for the file-system.Lastly, i figured a way to reduce method parameter bloat by introducing getters for the path resolver, filesystem objects in the
FileUpload
class