Index: /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/MapillaryImportIntoSequenceAction.java
===================================================================
--- /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/MapillaryImportIntoSequenceAction.java	(revision 31472)
+++ /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/MapillaryImportIntoSequenceAction.java	(revision 31473)
@@ -145,6 +145,5 @@
       if (lat_ref == null || lat == null || lon == null || lon_ref == null
           || datetimeOriginal == null)
-        throw new IllegalArgumentException(
-            "The picture has not correct EXIF tags");
+        return;
 
       double latValue = 0;
@@ -182,5 +181,5 @@
 
   /**
-   * Comparator that comperes two {@link MapillaryAbstractImage} objects
+   * Comparator that compares two {@link MapillaryAbstractImage} objects
    * depending on the time they were taken.
    *
Index: /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/downloads/MapillaryDownloader.java
===================================================================
--- /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/downloads/MapillaryDownloader.java	(revision 31472)
+++ /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/downloads/MapillaryDownloader.java	(revision 31473)
@@ -49,6 +49,6 @@
   public final static String CLIENT_ID = "T1Fzd20xZjdtR0s1VDk5OFNIOXpYdzoxNDYyOGRkYzUyYTFiMzgz";
   /** Executor that will run the petitions. */
-  private static ThreadPoolExecutor EXECUTOR = new ThreadPoolExecutor(3, 5,
-      100, TimeUnit.SECONDS, new ArrayBlockingQueue<Runnable>(50));
+  private static ThreadPoolExecutor EXECUTOR = new ThreadPoolExecutor(3, 5, 100, TimeUnit.SECONDS,
+      new ArrayBlockingQueue<Runnable>(100));;
 
   /**
@@ -229,9 +229,8 @@
       EXECUTOR.awaitTermination(30, TimeUnit.SECONDS);
     } catch (InterruptedException e) {
-      // TODO Auto-generated catch block
-      e.printStackTrace();
+      Main.error(e);
     }
     EXECUTOR = new ThreadPoolExecutor(3, 5, 100, TimeUnit.SECONDS,
-        new ArrayBlockingQueue<Runnable>(50));
+        new ArrayBlockingQueue<Runnable>(100));
   }
 }
Index: /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/FinishedUploadDialog.java
===================================================================
--- /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/FinishedUploadDialog.java	(revision 31473)
+++ /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/FinishedUploadDialog.java	(revision 31473)
@@ -0,0 +1,57 @@
+package org.openstreetmap.josm.plugins.mapillary.gui;
+
+import static org.openstreetmap.josm.tools.I18n.tr;
+
+import java.awt.Component;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import javax.swing.BoxLayout;
+import javax.swing.JButton;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+
+import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.plugins.mapillary.utils.MapillaryUtils;
+import org.openstreetmap.josm.plugins.mapillary.utils.PluginState;
+
+/**
+ * Dialog shown when a set of images is uploaded.
+ *
+ * @author nokutu
+ *
+ */
+public class FinishedUploadDialog extends JPanel {
+
+  private static final long serialVersionUID = -2180924089016037840L;
+
+  /**
+   * Main constructor.
+   */
+  public FinishedUploadDialog() {
+    this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
+    JLabel text = new JLabel(tr("Uploaded {0} images", PluginState.imagesUploaded));
+    text.setAlignmentX(Component.CENTER_ALIGNMENT);
+    this.add(text);
+    JButton web = new JButton("Approve upload in the website.");
+    web.addActionListener(new WebAction());
+    web.setAlignmentX(Component.CENTER_ALIGNMENT);
+    this.add(web, Component.CENTER_ALIGNMENT);
+  }
+
+  private class WebAction implements ActionListener {
+
+    @Override
+    public void actionPerformed(ActionEvent e) {
+      try {
+        MapillaryUtils.browse(new URL("http://www.mapillary.com/map/upload/im"));
+      } catch (MalformedURLException e1) {
+        Main.error(e1);
+      }
+    }
+
+  }
+
+}
Index: /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/HyperlinkLabel.java
===================================================================
--- /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/HyperlinkLabel.java	(revision 31472)
+++ /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/HyperlinkLabel.java	(revision 31473)
@@ -11,7 +11,5 @@
 import java.awt.event.ActionListener;
 import java.awt.event.MouseEvent;
-import java.io.IOException;
 import java.net.MalformedURLException;
-import java.net.URISyntaxException;
 import java.net.URL;
 
@@ -23,6 +21,5 @@
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.plugins.mapillary.MapillaryImage;
-
-import java.awt.Desktop;
+import org.openstreetmap.josm.plugins.mapillary.utils.MapillaryUtils;
 
 /**
@@ -176,19 +173,5 @@
     if (this.url == null)
       return;
-    Desktop desktop = Desktop.getDesktop();
-    if (desktop.isSupported(Desktop.Action.BROWSE)) {
-      try {
-        desktop.browse(this.url.toURI());
-      } catch (IOException | URISyntaxException e1) {
-        Main.error(e1);
-      }
-    } else {
-      Runtime runtime = Runtime.getRuntime();
-      try {
-        runtime.exec("xdg-open " + this.url);
-      } catch (IOException exc) {
-        exc.printStackTrace();
-      }
-    }
+    MapillaryUtils.browse(this.url);
   }
 }
Index: /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryPreferenceSetting.java
===================================================================
--- /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryPreferenceSetting.java	(revision 31472)
+++ /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryPreferenceSetting.java	(revision 31473)
@@ -3,10 +3,8 @@
 import static org.openstreetmap.josm.tools.I18n.tr;
 
-import java.awt.Desktop;
 import java.awt.FlowLayout;
 import java.awt.event.ActionEvent;
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
+import java.net.MalformedURLException;
+import java.net.URL;
 
 import javax.swing.AbstractAction;
@@ -25,4 +23,5 @@
 import org.openstreetmap.josm.plugins.mapillary.oauth.MapillaryUser;
 import org.openstreetmap.josm.plugins.mapillary.oauth.OAuthPortListener;
+import org.openstreetmap.josm.plugins.mapillary.utils.MapillaryUtils;
 
 /**
@@ -146,18 +145,8 @@
 
       String url = "http://www.mapillary.com/connect?redirect_uri=http:%2F%2Flocalhost:8763%2F&client_id=T1Fzd20xZjdtR0s1VDk5OFNIOXpYdzoxNDYyOGRkYzUyYTFiMzgz&response_type=token&scope=user:read%20public:upload%20public:write";
-      Desktop desktop = Desktop.getDesktop();
-      if (desktop.isSupported(Desktop.Action.BROWSE)) {
-        try {
-          desktop.browse(new URI(url));
-        } catch (IOException | URISyntaxException e1) {
-          Main.error(e1);
-        }
-      } else {
-        Runtime runtime = Runtime.getRuntime();
-        try {
-          runtime.exec("xdg-open " + url);
-        } catch (IOException exc) {
-          exc.printStackTrace();
-        }
+      try {
+        MapillaryUtils.browse(new URL(url));
+      } catch (MalformedURLException e) {
+        Main.error(e);
       }
     }
Index: /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/oauth/UploadUtils.java
===================================================================
--- /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/oauth/UploadUtils.java	(revision 31472)
+++ /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/oauth/UploadUtils.java	(revision 31473)
@@ -125,9 +125,10 @@
     HttpEntity entity = entityBuilder.build();
     httpPost.setEntity(entity);
-
     HttpResponse response = httpClient.execute(httpPost);
     if (response.getStatusLine().toString().contains("204")) {
       PluginState.imageUploaded();
-    }
+      Main.info(PluginState.getUploadString() + " (Mapillary)");
+    } else
+      Main.info("Upload error");
     file.delete();
     MapillaryUtils.updateHelpText();
@@ -153,11 +154,10 @@
       this.images = images;
       this.uuid = UUID.randomUUID();
-      this.ex = new ThreadPoolExecutor(3, 5, 25, TimeUnit.SECONDS,
-          new ArrayBlockingQueue<Runnable>(5));
+      this.ex = new ThreadPoolExecutor(1, 1, 25, TimeUnit.SECONDS,
+          new ArrayBlockingQueue<Runnable>(100));
     }
 
     @Override
     public void run() {
-      PluginState.startUpload();
       PluginState.imagesToUpload(this.images.size());
       MapillaryUtils.updateHelpText();
@@ -168,7 +168,12 @@
         this.ex.execute(new SingleUploadThread((MapillaryImportedImage) img,
             this.uuid));
+        while (this.ex.getQueue().remainingCapacity() == 0)
+          try {
+            Thread.sleep(100);
+          } catch (InterruptedException e) {
+            Main.error(e);
+          }
       }
       this.ex.shutdown();
-      PluginState.finishUpload();
     }
   }
@@ -187,5 +192,4 @@
     public void run() {
       upload(this.image, this.uuid);
-
     }
   }
@@ -212,6 +216,10 @@
     TiffOutputDirectory gpsDirectory = null;
     // If the image is imported, loads the rest of the EXIF data.
-    ImageMetadata metadata = Imaging.getMetadata(image.getFile());
-    final JpegImageMetadata jpegMetadata = (JpegImageMetadata) metadata;
+    JpegImageMetadata jpegMetadata = null;
+    try {
+      ImageMetadata metadata = Imaging.getMetadata(image.getFile());
+      jpegMetadata = (JpegImageMetadata) metadata;
+    } catch (Exception e) {
+    }
     if (null != jpegMetadata) {
       final TiffImageMetadata exif = jpegMetadata.getExif();
@@ -239,5 +247,5 @@
 
     outputSet.setGPSInDegrees(image.getLatLon().lon(), image.getLatLon().lat());
-    File tempFile = new File(c + ".tmp");
+    File tempFile = File.createTempFile("imagetoupload_" + c, ".tmp");
     c++;
     OutputStream os = new BufferedOutputStream(new FileOutputStream(tempFile));
Index: /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/utils/MapillaryUtils.java
===================================================================
--- /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/utils/MapillaryUtils.java	(revision 31472)
+++ /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/utils/MapillaryUtils.java	(revision 31473)
@@ -2,4 +2,9 @@
 
 import static org.openstreetmap.josm.tools.I18n.tr;
+
+import java.awt.Desktop;
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.net.URL;
 
 import org.apache.commons.imaging.common.RationalNumber;
@@ -91,3 +96,24 @@
     return result;
   }
+
+  /**
+   * @param url
+   */
+  public static void browse(URL url) {
+    Desktop desktop = Desktop.getDesktop();
+    if (desktop.isSupported(Desktop.Action.BROWSE)) {
+      try {
+        desktop.browse(url.toURI());
+      } catch (IOException | URISyntaxException e1) {
+        Main.error(e1);
+      }
+    } else {
+      Runtime runtime = Runtime.getRuntime();
+      try {
+        runtime.exec("xdg-open " + url);
+      } catch (IOException exc) {
+        exc.printStackTrace();
+      }
+    }
+  }
 }
Index: /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/utils/PluginState.java
===================================================================
--- /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/utils/PluginState.java	(revision 31472)
+++ /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/utils/PluginState.java	(revision 31473)
@@ -2,4 +2,13 @@
 
 import static org.openstreetmap.josm.tools.I18n.tr;
+
+import java.awt.Dimension;
+
+import javax.swing.JDialog;
+import javax.swing.JOptionPane;
+import javax.swing.SwingUtilities;
+
+import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.plugins.mapillary.gui.FinishedUploadDialog;
 
 /**
@@ -10,7 +19,8 @@
 
   private static int runningDownloads = 0;
-  private static int runningUploads = 0;
-  private static int imagesToUpload = 0;
-  private static int imagesUploaded = 0;
+  /** Images that have to be uploaded. */
+  public static int imagesToUpload = 0;
+  /** Images that have been uploaded. */
+  public static int imagesUploaded = 0;
 
   /**
@@ -38,15 +48,7 @@
 
   /**
-   * Called when an upload is starting.
-   */
-  public static void startUpload() {
-    runningUploads++;
-  }
-
-  /**
    * Called when an upload is finished.
    */
   public static void finishUpload() {
-    runningUploads--;
     if (imagesUploaded >= imagesToUpload) {
       imagesUploaded = 0;
@@ -61,5 +63,5 @@
    */
   public static boolean isUploading() {
-    return runningUploads > 0;
+    return imagesToUpload > imagesUploaded;
   }
 
@@ -79,4 +81,23 @@
   public static void imageUploaded() {
     imagesUploaded++;
+    if (imagesToUpload == imagesUploaded) {
+      finishedUploadDialog();
+    }
+  }
+
+  private static void finishedUploadDialog() {
+    if (!SwingUtilities.isEventDispatchThread()) {
+      SwingUtilities.invokeLater(new Runnable() {
+        @Override
+        public void run() {
+          finishedUploadDialog();
+        }
+      });
+    } else {
+      JOptionPane pane = new JOptionPane();
+      pane.setMessage(new FinishedUploadDialog());
+      JDialog dlg = pane.createDialog(Main.parent, tr("Finished upload"));
+      dlg.setVisible(true);
+    }
   }
 
@@ -87,5 +108,5 @@
    */
   public static String getUploadString() {
-    return tr("Downloading: {0}", "(" + imagesUploaded + "/" + imagesToUpload
+    return tr("Uploading: {0}", "(" + imagesUploaded + "/" + imagesToUpload
         + ")");
   }
