try {
imgBy = thumbnail.getBytes();
} catch (IOException e1) {
e1.printStackTrace();
}
FileSystem fSystem = new FileSystem();
fSystem.setBasePath("static");
String name = System.currentTimeMillis() + ".jpg";
fSystem.write(imgBy, name);
response.setContentType("text/plain");
response.setCharacterEncoding("utf-8");
PrintWriter out = null;
try {
out = response.getWriter();