--- nicedit.js	2008-12-01 15:14:41.000000000 +0100
+++ nicedit_edit.js	2009-02-08 21:10:03.000000000 +0100
@@ -4,6 +4,12 @@
  * Attach this editor to a target element.
  */
 Drupal.wysiwyg.editor.attach.nicedit = function(context, params, settings) {
+  // If nicUpload is used, add the format to the uri.
+  // This way we can let the server know which setting must be used when uploading files.
+  if (settings.uploadURI) {
+    settings.uploadURI += '/' + params.format;
+  };
+
   // Attach editor.
   var editor = new nicEditor(settings);
   editor.panelInstance(params.field);
