In my web application I have an image uploading module. I want to check the uploaded file whether it’s an image file or any other file. I am using Java in server side. The image is read as BufferedImage in java and then I am writing it to disk with ImageIO.write() How shall I check the BufferedImage, whether it’s really
Tag: file-upload
How can I upload files to a server using JSP/Servlet?
How can I upload files to server using JSP/Servlet? I tried this: However, I only get the file name, not the file content. When I add enctype=”multipart/form-data” to the <form>, then request.getParameter() returns null. During research I stumbled upon Apache Common FileUpload. I tried this: Unfortunately, the servlet threw an exception without a clear message and cause. Here is the