Uploading file correctly by LocalFileDetector