Index: applications/editors/josm/plugins/DirectUpload/src/org/openstreetmap/josm/plugins/DirectUpload/UploadDataGui.java
===================================================================
--- applications/editors/josm/plugins/DirectUpload/src/org/openstreetmap/josm/plugins/DirectUpload/UploadDataGui.java	(revision 29630)
+++ applications/editors/josm/plugins/DirectUpload/src/org/openstreetmap/josm/plugins/DirectUpload/UploadDataGui.java	(revision 29631)
@@ -32,5 +32,7 @@
 
 import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.data.gpx.GpxConstants;
 import org.openstreetmap.josm.data.gpx.GpxData;
+import org.openstreetmap.josm.data.gpx.GpxTrack;
 import org.openstreetmap.josm.gui.ExtendedDialog;
 import org.openstreetmap.josm.gui.JMultilineLabel;
@@ -140,5 +142,5 @@
         
         List<String> descHistory = new LinkedList<String>(Main.pref.getCollection("directupload.description.history", new LinkedList<String>()));
-        // we have to reverse the history, because ComboBoxHistory will reverse it againin addElement()
+        // we have to reverse the history, because ComboBoxHistory will reverse it again in addElement()
         // XXX this should be handled in HistoryComboBox
         Collections.reverse(descHistory);
@@ -175,10 +177,22 @@
 
     private void initTitleAndDescriptionFromGpxData(GpxData gpxData) {
-      String description, title;
-      try {
-          description = gpxData.storageFile.getName().replaceAll("[&?/\\\\]"," ").replaceAll("(\\.[^.]*)$","");
+      String description, title, tags = "";
+      if (gpxData != null) {
+          GpxTrack firstTrack = gpxData.tracks.iterator().next();
+          Object meta_desc = gpxData.attr.get(GpxConstants.META_DESC);
+          if (meta_desc != null) {
+              description = meta_desc.toString();
+          } else if (firstTrack != null && gpxData.tracks.size() == 1 && firstTrack.get("desc") != null) {
+              description = firstTrack.getString("desc");
+          } else {
+              description = gpxData.storageFile.getName().replaceAll("[&?/\\\\]"," ").replaceAll("(\\.[^.]*)$","");
+          }
           title = tr("Selected track: {0}", gpxData.storageFile.getName());
+          Object meta_tags = gpxData.attr.get(GpxConstants.META_KEYWORDS);
+          if (meta_tags != null) {
+              tags = meta_tags.toString();
+          }
       }
-      catch(Exception e) {
+      else {
           description = new SimpleDateFormat("yyMMddHHmmss").format(new Date()); 
           title = tr("No GPX layer selected. Cannot upload a trace.");
@@ -186,4 +200,5 @@
       OutputDisplay.setText(title);
       descriptionField.setText(description);
+      tagsField.setText(tags);
     }
 
@@ -191,5 +206,5 @@
      * This is the actual workhorse that manages the upload.
      * @param String Description of the GPX track being uploaded
-     * @param String Tags assosciated with the GPX track being uploaded
+     * @param String Tags associated with the GPX track being uploaded
      * @param boolean Shall the GPX track be public
      * @param GpxData The GPX Data to upload
