bug fix: correct dirStructure for upload function