Skip to content

Commit

Permalink
Better support for the id file
Browse files Browse the repository at this point in the history
- Added better support to determine where the jar file is
- Added title to main screen
- Updated readme
  • Loading branch information
james2432 committed Aug 19, 2016
1 parent ee41acf commit 2a5b1fe
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public JFMain() {
//initComponents();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
this.setSize(640,320);
this.setTitle("OSVUploadr");
}

/**
Expand Down
12 changes: 11 additions & 1 deletion OSVUploadr/src/main/java/ca/osmcanada/osvuploadr/JPMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLConnection;
import java.net.URLDecoder;
import java.net.URLEncoder;
import java.text.DecimalFormat;
import java.util.Date;
Expand Down Expand Up @@ -608,7 +609,16 @@ private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRS
}//GEN-LAST:event_jButton5ActionPerformed

private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
File id = new File("./id_file.txt");
String path = ca.osmcanada.osvuploadr.JFMain.class.getProtectionDomain().getCodeSource().getLocation().getPath();
String decodedPath="";
try{
decodedPath=new File(URLDecoder.decode(path, "UTF-8")).getParentFile().getPath();
}
catch(Exception ex)
{
Logger.getLogger(JPMain.class.getName()).log(Level.SEVERE, null, ex);
}
File id = new File(decodedPath+"/id_file.txt");
String usr="";
if(!id.exists())
{
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,4 @@ To start the application you need the java runtime environment(JRE) version 1.8+
- Upload process is not threaded, so the upload button will look frozen until it finishes the upload.
- If images aren't geotagged the application will probably crash
- Remove Duplicates does nothing (for now)
- Application is only for action cameras. I will eventually incorporate images/videos taken from the APP.
- No resume from last file. Currently reuploads from image 1. (Currently working on this)
- Application is only for action cameras. I will eventually incorporate images/videos taken from the APP.

0 comments on commit 2a5b1fe

Please sign in to comment.