Resizes files uploads and stores them in a given directory