@@ -297,8 +301,12 @@ a.spaceBreadcrumbLink:link, a.spaceBreadcrumbLink:visited, a.spaceBreadcrumbLink
border: 1px solid #CCD4DB;
background-color: #EEF7FB;
width: 24em;
- height: 6em;
+ height: 4em;
+ padding: 8px;
+ margin: 8px;
display: none;
+ left: 8px;
+ -moz-border-radius: 5px;
}
\ No newline at end of file
diff --git a/source/java/org/alfresco/web/bean/ajax/FileUploadBean.java b/source/java/org/alfresco/web/bean/ajax/FileUploadBean.java
new file mode 100644
index 0000000000..6770b14219
--- /dev/null
+++ b/source/java/org/alfresco/web/bean/ajax/FileUploadBean.java
@@ -0,0 +1,195 @@
+/*
+ * Copyright (C) 2005-2007 Alfresco Software Limited.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+ * As a special exception to the terms and conditions of version 2.0 of
+ * the GPL, you may redistribute this Program in connection with Free/Libre
+ * and Open Source Software ("FLOSS") applications as described in Alfresco's
+ * FLOSS exception. You should have recieved a copy of the text describing
+ * the FLOSS exception, and it is also available here:
+ * http://www.alfresco.com/legal/licensing
+ */
+package org.alfresco.web.bean.ajax;
+
+import java.io.File;
+import java.io.Serializable;
+import java.net.URLDecoder;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.StringTokenizer;
+
+import javax.faces.context.ExternalContext;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+import javax.servlet.http.HttpServletRequest;
+
+import org.alfresco.model.ContentModel;
+import org.alfresco.repo.content.MimetypeMap;
+import org.alfresco.repo.content.filestore.FileContentReader;
+import org.alfresco.service.ServiceRegistry;
+import org.alfresco.service.cmr.model.FileInfo;
+import org.alfresco.service.cmr.repository.ContentReader;
+import org.alfresco.service.cmr.repository.ContentWriter;
+import org.alfresco.service.cmr.repository.NodeRef;
+import org.alfresco.service.namespace.QName;
+import org.alfresco.util.TempFileProvider;
+import org.alfresco.web.app.servlet.BaseServlet;
+import org.alfresco.web.app.servlet.ajax.InvokeCommand;
+import org.alfresco.web.bean.repository.Repository;
+import org.alfresco.web.forms.XMLUtil;
+import org.apache.commons.fileupload.FileItem;
+import org.apache.commons.fileupload.disk.DiskFileItemFactory;
+import org.apache.commons.fileupload.servlet.ServletFileUpload;
+import org.apache.commons.io.FilenameUtils;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+/**
+ * @author Kevin Roast
+ */
+public class FileUploadBean
+{
+ @InvokeCommand.ResponseMimetype(value=MimetypeMap.MIMETYPE_HTML)
+ public void uploadFile() throws Exception
+ {
+ FacesContext fc = FacesContext.getCurrentInstance();
+ ExternalContext externalContext = fc.getExternalContext();
+ HttpServletRequest request = (HttpServletRequest)externalContext.getRequest();
+
+ ServletFileUpload upload = new ServletFileUpload(new DiskFileItemFactory());
+ upload.setHeaderEncoding("UTF-8");
+
+ List