G'day guys,
I'm really stoked that i came across your product. It's very cool...
I have a working servlet (that i hacked together quickly from some code i found on your website).
The basic functionality works for a single image/video but fails on multiple images/video.
The timeout on my tomcat server is set to 30 minutes, so there is plenty of time.
But with a multi file upload i get the message...
Upload faliure
Upload timeout. Please conatct the website support to resolve this problem.
The funny thing is, the multiple files that i'm upload are in the root of my test web app (where they should be at the moment).
this is my hacked code.
It's a start so please don't laugh...
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
System.out.println("doPost....");
HttpSession session = request.getSession();
String filePath = "";
FileItemFactory factory = new DiskFileItemFactory();
ServletFileUpload upload = new ServletFileUpload(factory);
ServletContext context = getServletContext();
System.out.println("context " + context);
String galleryPath = "";
String absGalleryPath;
absGalleryPath = context.getRealPath(galleryPath);
System.out.println("absGalleryPath " + absGalleryPath);
List listFileItems = null;
Hashtable fileItems = new Hashtable();
try {
listFileItems = upload.parseRequest(request);
System.out.println("listFileItems " + listFileItems.size());
for (int i = 0; i < listFileItems.size(); i++) {
FileItem fileItem = (FileItem) (listFileItems.get(i));
fileItems.put(fileItem.getFieldName(), fileItem);
}
} catch (FileUploadException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
//Get total number of uploaded files (all files are uploaded in a single package).
int fileCount = Integer.parseInt(((FileItem) fileItems.get("PackageFileCount")).getString());
System.out.println("fileCount " + fileCount);
//Iterate through uploaded data and save the original file, thumbnail, and description.
for (int i = 0; i < fileCount; i++) {
//Get source file and save it to disk.
FileItem sourceFileItem = (FileItem) fileItems.get("File0_" + Integer.toString(i));
String fileName = new File(sourceFileItem.getName()).getName();
File sourceFile = new File(absGalleryPath + File.separator + fileName);
try {
sourceFileItem.write(sourceFile);
} catch (Exception e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
}
enjoiMark
Also, where does the name aurigma come from?