I am able to upload files at the default location.
router.route().handler(
BodyHandler.create()
.setBodyLimit(500 * KB)
);
router.post("/admin/add").handler(adminActions::createNewItem);
This body handler puts file in file-uploads. This is the code that uploads files:
public void createNewItem(RoutingContext context) {
var request = context.request();
var type = context.request().getFormAttribute("type");
// other code...
for(var f : context.fileUploads()) {
System.out.println(f.fileName());
}
}
These are the files I have uploaded.
The file-uploads folder is at the root of my project, it's been automatically created. How do I reach the content of that folder to show the images in my html pages?
It's weird also, they have no extension...