[lib] redesigned fileupload