Index: /applications/editors/josm/plugins/mapillary/.gitignore
===================================================================
--- /applications/editors/josm/plugins/mapillary/.gitignore	(revision 31445)
+++ /applications/editors/josm/plugins/mapillary/.gitignore	(revision 31446)
@@ -4,4 +4,4 @@
 /build/
 /.gradle/
-
+/.settings
 /test/data/preferences/
Index: /applications/editors/josm/plugins/mapillary/build.gradle
===================================================================
--- /applications/editors/josm/plugins/mapillary/build.gradle	(revision 31445)
+++ /applications/editors/josm/plugins/mapillary/build.gradle	(revision 31446)
@@ -33,4 +33,5 @@
 
   packIntoJar 'com.amazonaws:aws-java-sdk-s3:1.10.8'
+  packIntoJar 'org.apache.httpcomponents:httpmime:4.5'
 
   testCompile 'junit:junit:4.12'
Index: /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/MapillaryUploadAction.java
===================================================================
--- /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/MapillaryUploadAction.java	(revision 31445)
+++ /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/MapillaryUploadAction.java	(revision 31446)
@@ -56,13 +56,6 @@
         && (int) pane.getValue() == JOptionPane.OK_OPTION) {
       if (dialog.sequence.isSelected()) {
-        try {
-          OAuthUtils.uploadSequence(MapillaryData.getInstance().getSelectedImage().getSequence());
-        } catch (InvalidKeyException e) {
-          Main.error(e);
-        } catch (UnsupportedEncodingException e) {
-          Main.error(e);
-        } catch (NoSuchAlgorithmException e) {
-          Main.error(e);
-        }
+        OAuthUtils.uploadSequence(MapillaryData.getInstance()
+            .getSelectedImage().getSequence());
       }
     }
Index: /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/oauth/OAuthUtils.java
===================================================================
--- /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/oauth/OAuthUtils.java	(revision 31445)
+++ /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/oauth/OAuthUtils.java	(revision 31446)
@@ -15,5 +15,9 @@
 import java.security.NoSuchAlgorithmException;
 import java.util.HashMap;
+import java.util.List;
 import java.util.UUID;
+import java.util.concurrent.ArrayBlockingQueue;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
 
 import javax.imageio.ImageIO;
@@ -155,5 +159,4 @@
       entityBuilder.addPart(key, new StringBody(hash.get(key),
           ContentType.TEXT_PLAIN));
-      System.out.println(key + " => " + hash.get(key));
     }
     entityBuilder.addPart("file", new FileBody(file));
@@ -162,7 +165,8 @@
     httpPost.setEntity(entity);
 
-    System.out.println(httpPost);
     HttpResponse response = httpClient.execute(httpPost);
-    System.out.println(response.toString());
+    if (response.getStatusLine().toString().contains("204"))
+      System.out.println("Succesfully uploaded image");
+    file.delete();
   }
 
@@ -177,16 +181,47 @@
    * @throws InvalidKeyException
    */
-  public static void uploadSequence(MapillarySequence sequence)
-      throws InvalidKeyException, UnsupportedEncodingException,
-      NoSuchAlgorithmException {
-    UUID uuid = UUID.randomUUID();
-
-    for (MapillaryAbstractImage img : sequence.getImages()) {
-      if (!(img instanceof MapillaryImportedImage))
-        throw new IllegalArgumentException(
-            "The sequence contains downloaded images.");
+  public static void uploadSequence(MapillarySequence sequence) {
+    new SequenceUploadThread(sequence.getImages()).start();
+  }
+
+  private static class SequenceUploadThread extends Thread {
+    private List<MapillaryAbstractImage> images;
+    private UUID uuid;
+    ThreadPoolExecutor ex;
+
+    private SequenceUploadThread(List<MapillaryAbstractImage> images) {
+      this.images = images;
+      this.uuid = UUID.randomUUID();
+      this.ex = new ThreadPoolExecutor(3, 5, 25, TimeUnit.SECONDS,
+          new ArrayBlockingQueue<Runnable>(5));
+    }
+
+    @Override
+    public void run() {
+      for (MapillaryAbstractImage img : this.images) {
+        if (!(img instanceof MapillaryImportedImage))
+          throw new IllegalArgumentException(
+              "The sequence contains downloaded images.");
+        this.ex.execute(new SingleUploadThread((MapillaryImportedImage) img,
+            this.uuid));
+      }
+    }
+  }
+
+  private static class SingleUploadThread extends Thread {
+
+    private MapillaryImportedImage image;
+    private UUID uuid;
+
+    private SingleUploadThread(MapillaryImportedImage image, UUID uuid) {
+      this.image = image;
+      this.uuid = uuid;
+    }
+
+    @Override
+    public void run() {
       try {
-        upload((MapillaryImportedImage) img, uuid);
-      } catch (IOException e) {
+        OAuthUtils.upload(this.image, this.uuid);
+      } catch (InvalidKeyException | NoSuchAlgorithmException | IOException e) {
         Main.error(e);
       }
@@ -226,4 +261,5 @@
     outputSet.setGPSInDegrees(image.getLatLon().lon(), image.getLatLon().lat());
     File tempFile = new File(c + ".tmp");
+    c++;
     OutputStream os = new BufferedOutputStream(new FileOutputStream(tempFile));
 
