Details
Description
Uploading an archive with IE fails because the uploaded file name contains the full path. This is due to the different behaviour to commons-upload FileItem, depending on the browser.
The uploaded file name needs to be stripped of any path prefix, if present.
Activity

Field | Original Value | New Value |
---|---|---|
Fix Version/s | web-2.1.4 [ 15894 ] |

Summary | Incorrect uploaded filename handling on Windows IE | Incorrect uploaded filename on Windows IE |
Description |
Uploading an archive with IE fails because the uploaded file name is not properly recognised. So it tries to append full path, e.g. for file C:\archive.zip and upload dir C:\Documents and Settings\user\upload, it tries to upload to C:\Documents and Settings\user\upload\C:\archive.zip, which fails. The uploaded file name needs to be stripped of any path prefix, if present. |
Uploading an archive with IE fails because the uploaded file name contains the full path. This is due to the different behaviour to commons-upload FileItem, depending on the browser. The uploaded file name needs to be stripped of any path prefix, if present. |

Status | Open [ 1 ] | Resolved [ 5 ] |
Resolution | Fixed [ 1 ] |

Status | Resolved [ 5 ] | Reopened [ 4 ] |
Assignee | Mauro Talevi [ maurotalevi ] | |
Resolution | Fixed [ 1 ] |

Fix Version/s | web-2.1.5 [ 16021 ] |

Resolution | Fixed [ 1 ] | |
Status | Reopened [ 4 ] | Resolved [ 5 ] |
Using new File(path).getName() to extract the file name (without parent path info) only works when client and server use same file separator.
Need to use a cross-platform solution like Commons-IO FilenameUtils.getName(path)