Tapestry
  1. Tapestry
  2. TAPESTRY-1120

UploadPart / getFileName() doesn't work cross-platform

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.0.2
    • Fix Version/s: 4.1.2
    • Component/s: Framework
    • Labels:
      None

      Description

      I could not reopen the issue http://issues.apache.org/bugzilla/show_bug.cgi?id=27544
      So I opened this one.

      The bug described by Karel Miarka is still not resolved. There is a bug in org.apache.tapestry.multipart.UploadPart 's getFileName method.:

      public String getFileName()
      {
      File file = new File(this.getFilePath());

      return file.getName();
      }

      You simply can not rely on JDK File implementation because it is not suitable to work cross-platform. Especially when uploading file from the MS IE client (on Windows of course to the unix-like server. MS IE sends full filename i.e. C:\Documents and Settings\user\Desktop\test.txt. This UploadPart implementation on the server use "/" character as a separator, therefore the file name could not be resolved.

      It would be appreciable if this bug would be fixed in the next release.

        Activity

        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12568686 ] jira [ 12591714 ]
        Mark Thomas made changes -
        Workflow jira [ 12387149 ] Default workflow, editable Closed status [ 12568686 ]
        Jesse Kuhnert made changes -
        Resolution Fixed [ 1 ]
        Status Reopened [ 4 ] Resolved [ 5 ]
        Fix Version/s 4.1.2 [ 12312202 ]
        Fix Version/s 4.1.1 [ 12312021 ]
        Jesse Kuhnert made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Assignee Jesse Kuhnert [ jkuhnert ]
        Jesse Kuhnert made changes -
        Field Original Value New Value
        Resolution Fixed [ 1 ]
        Fix Version/s 4.1.1 [ 12312021 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Martin Petras created issue -

          People

          • Assignee:
            Jesse Kuhnert
            Reporter:
            Martin Petras
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development