switched from streaming to buffered uploading
fixed directory path trailing slash correction