• rbowen
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies

Here is an odd one.  We've created a new Note object, with Notes & Attachments as a Related list.  We created the new Note object in order to have some custom fields, and still have attachments.

 

We've created a VF page for the upload, and everything works properly on some machines using IE9 and for all (?) machines using Firefox.

 

Pretty standard stuff.  Here is the pertinent VF code:

 

<apex:inputfile value="{!myfile.body}" fileName="{!myfile.Name}" />

 

It saves the attachment in the N&A related list on the new Note object, and sets the Name to the filename.  Everything works great, and as intended.

 

However, on certain machines using IE9, the filename is set to the full path+filename (minus any slashes) when the file is saved.  This seems to have happened recently (last few weeks) for some machines, but no settings were changed in IE9 during that time that we know of.

 

Example:

 

File located at C:\Users\UserName\Desktop\file.doc on the user's machine

 

So, on the machines where it is working correctly, the file is is uploaded and is saved with a fileName of "file.doc."

 

However, on the machines where it is NOT working correctly, the file is uploaded and is saved with a fileName of "C:UsersUserNameDesktopfile.doc".

 

We've tried clearing cache and cookies in IE on those machines.  Those same machines will create the file with the proper title (file.doc) when using Firefox.  We figure it must be a setting or cache in IE on certain machines that is causing the problem.

 

Any ideas?

 

Thanks in advance.

  • December 11, 2012
  • Like
  • 0