We have huge list of images that we need to store in an external path.. i.e outside of play application folder.
How can we make it available to play as an asset so i
Play 2.5
file: routes
GET /external_resources/*file controllers.ImagesController.getImage(path="/home/project_name/external/images", file: String)
file: ImagesController
package controllers;
import play.mvc.Controller;
import play.mvc.Result;
import java.io.File;
/**
* Created by js on 6/1/17.
*/
public class ImagesController extends Controller {
public Result getImage(String path, String image) {
System.out.println(path);
System.out.println(image);
image = image.replace("%20", " ");
File file = new File(path + image);
return ok(file);
}
}