add upload, remove directory check