mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
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:
@@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user