JBehave
  1. JBehave
  2. JBEHAVE-195

Incorrect uploaded filename on Windows IE

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: web-2.1.3
    • Fix Version/s: web-2.1.4, web-2.1.5, web-3.0
    • Component/s: None
    • Labels:
      None
    • Environment:
      Windows IE
    • Number of attachments :
      0

      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

        Mauro Talevi made changes -
        Field Original Value New Value
        Fix Version/s web-2.1.4 [ 15894 ]
        Mauro Talevi made changes -
        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.
        Mauro Talevi made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Mauro Talevi added a comment -

        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)

        Show
        Mauro Talevi added a comment - 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)
        Mauro Talevi made changes -
        Status Resolved [ 5 ] Reopened [ 4 ]
        Assignee Mauro Talevi [ maurotalevi ]
        Resolution Fixed [ 1 ]
        Mauro Talevi made changes -
        Fix Version/s web-2.1.5 [ 16021 ]
        Mauro Talevi made changes -
        Resolution Fixed [ 1 ]
        Status Reopened [ 4 ] Resolved [ 5 ]

          People

          • Assignee:
            Mauro Talevi
            Reporter:
            Mauro Talevi
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: