String fileName = ij.getAssetName()+fileType;
String fileName = ij.getFilename();
	public void actionPerformed(ActionEvent ev)	{		// get the file data to send		byte[] fileData = null;		String fileType = ij.getFileType();		if (fileType == ".gif") {			fileData = getGif(ij.getImagePlus());		} else if (fileType == ".jpg") {			fileData = getJpeg(ij.getImagePlus());		} else {			showError("Undefined file type " + fileType);		}		String fileName = ij.getAssetName()+fileType;		if (fileName.length() < 5) {			showError("You must give a filename before committing");			return;		}		final int length = fileData.length;		// Figure out where to send it		URL submitURL = null;		try {			submitURL = new URL(ij.getParameter("SUBMIT_URL"));		} catch (MalformedURLException e) {			showError("Malformed URL: "+ij.getParameter("SUBMIT_URL"));			return;		} catch (Exception e) {			showError("Problem getting SUBMIT_URL parameter");			return;		}		// Start showing progress		Thread progressThread = new Thread() {			public void run() {				ServerSubmitProgressDialog progressDialog = new ServerSubmitProgressDialog(length);				int p = getProgress();				while (p < length) {					progressDialog.setValue(p);					try { sleep(50); } catch (Exception e) {}					p = getProgress();				}				progressDialog.setTitle("Waiting for server response...");				progressDialog.goIndeterminate();				while (progress != -1) {					try { sleep(100); } catch (Exception e) {}				}				progressDialog.setVisible(false);			}		};		progressThread.start();		// Start sending the data		ServerSubmitterThread submitterThread = new ServerSubmitterThread(this, fileData, fileName, submitURL);		submitterThread.start();	}//end actionPerformed()