Since we didn't copy the null terminator to temp_filepath, dirname could return the wrong result.
Attach a file by drag & drop or click to upload