Handle creation and removal of subdirectories for uploaded files