Menu

getFileName() returns path too...

2001-07-02
2001-08-03
  • André Schild

    André Schild - 2001-07-02

    Hello,

    a minor inconvenience:
    When uploading a file via Netscape 4.7x and IE5.5 on from Windows2000, then the filename AND the path to the original filellocation are returned by getFileName(), but all backslashes are just stripped.

    Anyone seen this behaviour too and perhaps even a solution ????

     
    • Anonymous

      Anonymous - 2001-07-02

      :😁:

      Now we have a question about this under "Forums", "Bugs", and "Support".  I guess that qualifies it as a frequently asked question. 

      Consequently, I have created a FAQ and placed it under the Docs catagory.  You can view the answer to your question at http://sourceforge.net/docman/display_doc.php?docid=5339&group_id=18976

      I have created a survey as well about this issue.  You may contribute your thoughts at http://sourceforge.net/survey/survey.php?group_id=18976&survey_id=11912

      - David

       
      • Matthew Cooper

        Matthew Cooper - 2001-07-02

        I know that there is always a reason out there somewhere, but I would have thought that for most applications the local filename / path is pretty irrelevant. Hence I voted low prioty in the survey.

         
    • André Schild

      André Schild - 2001-07-03

      Hmm.....

      so we just again have the same problem. The spec says how to do it, but 90% of the day-by-day browsers do it the other way :-(

      And it's realy nasty, when a filename is displayed as C:MyDocumentsPicturesMyPicture.gif

       
      • Anonymous

        Anonymous - 2001-07-03

        Gee, it's almost like Microsoft would like to create incompatabilities with non-MS software to force users into staying with their products...

        ;)

        - David

         
        • André Schild

          André Schild - 2001-07-04

          Probably it was Netscape on Windows who first introduced this behaviour. And a long time ago MS IE 3.x had to be compatible with Netscape, they probably just took over the bug....

           
    • Pavel Rans

      Pavel Rans - 2001-08-03

      I can see very simple solution :
      in the method extractFormValues()
      instead of
      filename = bp.getFileName();
      we could use
      filename = (String)m.get("filename");

      It is very difficult to purely handle buggy
      behavior of current browsers, but this solution
      should not produce bugs in the future. Unless the browsers will behave properly....
      Then there should be another method beside getFileName(), eg. getSentFileName() returning what the browser had sent.

       

Log in to post a comment.

MongoDB Logo MongoDB