You need to sign in to do that
Don't have an account?
Filename includes path on some machines using IE (9), when using inputFile to upload file on VF page
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.
I am having the same issue. Chrome, Firefox and Safari work fine but IE adds the full file path to any and all attachments.
We are under the na6 subdomain.
Any help or fixes would be appreciated.
Here's the fix for this issue encountered on IE:
- Click on Internet Options
- Click on the Security tab, select Internet and then, click on Custom Level
- In the Security Settings window, scroll down until you see “Include local directory path when uploading files to a server”. If “Enable” is selected, change the selection to Disable. Click OK.
- Click OK on Internet Options window and Refresh the browser.
Cheers!
(Please mark this reply as a solution if the fix resolves the issue)
That worked - thanks!
somewhat in defense of salesforce I have seen nothing to show this resulted from a change at salesforce.
We were able to correlate this IE setting changes to windows update patches which our IT system pushed out to our windows machines the weekend of December 15th, 2012
We investigated with our IT team to see if they changed the setting in group policy and they did not.
I place the blame for this squarely on microsoft.
We have advised all users to use Chrome or Firefox if possible and if not they have to change the setting in IE.
Meanwhile a ticket is moving through my IT department to get this set in group policy.
One of the updates here is likely the cause
http://www.evernote.com/shard/s54/sh/bce9639d-4589-44c7-982e-be2ae0f40a38/8a14038c2d76b1bc3c7df7d8f1ad310f