All Downloads are FREE. Search and download functionalities are using the official Maven repository.

nl.nn.testtool.echo2.util.Upload Maven / Gradle / Ivy

package nl.nn.testtool.echo2.util;

import java.io.InputStream;

import nl.nn.testtool.storage.CrudStorage;
import nl.nn.testtool.util.Import;

import org.apache.log4j.Logger;

public class Upload {

	public static String upload(String filename, InputStream inputStream, CrudStorage storage, Logger log) {
		log.debug("Process upload of file: " + filename);
		if (filename.endsWith(".zip")) {
			return Import.importZip(inputStream, storage, log);
		} else if (filename.endsWith(".ttr")) {
			return Import.importTtr(inputStream, storage, log);
		} else {
			return "File doesn't have a known file extension: " + filename;
		}
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy