Browser and Tasks Google Gadgets improvements and IE6/7 rendering fixes. Fix to FormData to strip path from upload filename from IE.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@7298 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2007-11-05 16:44:13 +00:00
parent eb989afb99
commit 97239fcf17
2 changed files with 11 additions and 5 deletions

View File

@@ -43,6 +43,7 @@ import org.apache.commons.fileupload.FileItemFactory;
import org.apache.commons.fileupload.FileUploadException;
import org.apache.commons.fileupload.disk.DiskFileItemFactory;
import org.apache.commons.fileupload.servlet.ServletFileUpload;
import org.apache.commons.io.FilenameUtils;
import org.mozilla.javascript.Context;
import org.mozilla.javascript.Scriptable;
@@ -320,14 +321,13 @@ public class FormData implements Serializable, Scopeable
*/
public String getFilename()
{
return file.getName();
// workaround a bug in IE where the full path is returned
return FilenameUtils.getName(file.getName());
}
public String jsGet_filename()
{
return getFilename();
}
}
}