Use relative server path instead...

This commit is contained in:
Joshua Sigona 2020-07-21 05:26:57 +09:00
parent d0088af983
commit 0a9b5a44ba

View File

@ -136,8 +136,8 @@ public class Controller {
System.out.println(url);
BufferedImage img = null;
if (url.contains("http://projectdivar.com/")) {
System.out.println("Locally available. "+"./"+url.replace("http://projectdivar.com/", ""));
img = ImageIO.read(new File("./"+url.replace("http://projectdivar.com/", "")));
//System.out.println("Locally available. "+"./"+url.replace("http://projectdivar.com/", ""));
img = ImageIO.read(new File("../../server/"+url.replace("http://projectdivar.com/", "")));
} else {
downloadFileFromUrl(url,"temp");
//BufferedImage img = ImageUtils.toBufferedImage(ImageIO.read(new File("temp")).getScaledInstance(1227, 690, Image.SCALE_SMOOTH));