Index: FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/connector/impl/SimpleFileSystemConnector.java
===================================================================
--- FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/connector/impl/SimpleFileSystemConnector.java	(revision 2588)
+++ FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/connector/impl/SimpleFileSystemConnector.java	(revision 2589)
@@ -41,4 +41,5 @@
 import net.fckeditor.connector.exception.UnknownException;
 import net.fckeditor.handlers.ConnectorHandler;
+import net.fckeditor.handlers.RequestCycleHandler;
 import net.fckeditor.handlers.ResourceType;
 import net.fckeditor.requestcycle.ThreadLocalData;
@@ -82,28 +83,18 @@
 	 * @see net.fckeditor.connector.Connector#fileUpload(net.fckeditor.handlers.ResourceType, java.lang.String, java.lang.String, java.io.InputStream)
 	 */
-	public String fileUpload(final ResourceType type, final String currentFolder, final String fileName, final InputStream inputStream) 
+	public String fileUpload(final ResourceType type,
+			final String currentFolder, final String fileName,
+			final InputStream inputStream) 
 			throws InvalidCurrentFolderException, SecurityIssueException {
-		String baseDir = ConnectorHandler.getUserFilesPath();
-		File typeDir = getAndCreateResourceTypeDir(baseDir, type);
+		String absolutePath = RequestCycleHandler
+				.getUserFilesAbsolutePath(ThreadLocalData.getRequest());
+		File typeDir = getAndCreateResourceTypeDir(absolutePath, type);
 		File currentDir = new File(typeDir, currentFolder);
 		if (!currentDir.exists())
 			throw new InvalidCurrentFolderException(); 
-		return upload(currentDir, fileName, inputStream);
-	}
-	
-	/* (non-Javadoc)
-	 * @see net.fckeditor.connector.Connector#quickUpload(java.lang.String, java.io.InputStream)
-	 */
-	public String quickUpload(String fileName, final InputStream inputStream) throws SecurityIssueException {
-		File currentDir = new File(servletContext.getRealPath(ConnectorHandler.getUserFilesPath()));
-		return upload(currentDir, fileName, inputStream);
-	}
-
-	private String upload(final File currentDir, final String fileName, final InputStream inputStream) throws SecurityIssueException {
 		File newFile = new File(currentDir, fileName);
 		File fileToSave = UtilsFile.getUniqueFile(newFile.getAbsoluteFile());
 		try {
-			BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(fileToSave));
-			IOUtils.copyLarge(inputStream, out);
+			IOUtils.copyLarge(inputStream, new FileOutputStream(fileToSave));
 		} catch (Exception e) {
 			throw new SecurityIssueException();
@@ -185,11 +176,6 @@
 	
 	private static File getAndCreateResourceTypeDir(final String baseDir, final ResourceType type) {
-		String folderStr = new String(baseDir);
-		String contextPath = ThreadLocalData.getServletRequest().getContextPath();
-		//we have to check, if there is a context path and cut it, it's obsolete for the filesystem
-		if (Utils.isNotEmpty(contextPath))
-			folderStr = folderStr.substring(contextPath.length());
-		File dir = new File(servletContext.getRealPath(folderStr), type.getPath());
-		if (!dir.exists()) 
+		File dir = new File(servletContext.getRealPath(baseDir), type.getPath());
+		if (!dir.exists())
 			dir.mkdirs();
 		return dir;
Index: FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/requestcycle/UserAction.java
===================================================================
--- FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/requestcycle/UserAction.java	(revision 2588)
+++ FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/requestcycle/UserAction.java	(revision 2589)
@@ -36,6 +36,4 @@
  * to create folders.</li>
  * </ul>
- * <strong>If your implementation needs {@link HttpServletRequest} e.g. to get a
- * session variable, you can get it by calling {@link ThreadLocalData#getServletRequest()}.</strong>
  * 
  * @version $Id$
@@ -49,5 +47,5 @@
 	 *         <code>false</code>
 	 */
-	public boolean isEnabledForFileUpload();
+	public boolean isEnabledForFileUpload(final HttpServletRequest request);
 
 	/**
@@ -57,5 +55,5 @@
 	 *         <code>false</code>
 	 */
-	public boolean isEnabledForFileBrowsing();
+	public boolean isEnabledForFileBrowsing(final HttpServletRequest request);
 	
 
@@ -66,5 +64,5 @@
 	 *         <code>false</code>
 	 */
-	public boolean isEnabledForFolderCreation();
+	public boolean isEnabledForFolderCreation(final HttpServletRequest request);
 
 }
Index: FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/requestcycle/impl/ContextPathBuilder.java
===================================================================
--- FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/requestcycle/impl/ContextPathBuilder.java	(revision 2588)
+++ FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/requestcycle/impl/ContextPathBuilder.java	(revision 2589)
@@ -21,4 +21,6 @@
 package net.fckeditor.requestcycle.impl;
 
+import javax.servlet.http.HttpServletRequest;
+
 import net.fckeditor.handlers.ConnectorHandler;
 import net.fckeditor.requestcycle.ThreadLocalData;
@@ -37,7 +39,6 @@
 	 * @see net.fckeditor.requestcycle.UserPathBuilder#getUserFilesPath()
 	 */
-	public String getUserFilesPath() {
-		String path = ThreadLocalData.getServletRequest().getContextPath().concat(ConnectorHandler.getUserFilesPath());
-		return path;
+	public String getUserFilesPath(final HttpServletRequest request) {
+		return request.getContextPath().concat(ConnectorHandler.getUserFilesPath());
 	}
 	
@@ -45,6 +46,6 @@
 	 * @see net.fckeditor.requestcycle.UserPathBuilder#getLocalUserFilesPath()
 	 */
-	public String getUserFilesAbsolutePath() {
-		return ConnectorHandler.getUserFilesPath();
+	public String getUserFilesAbsolutePath(final HttpServletRequest request) {
+		return ConnectorHandler.getUserFilesAbsolutePath();
 	}
 }
