It looks like you're new here. If you want to get involved, click one of these buttons!
$('#fileInput').fileUploadSettings('scriptData', '&newFileName=${bean.newFileName}');List fileItems = fu.parseRequest(req);
public boolean procesaFicheros(HttpServletRequest req, PrintWriter out, MrBean bean) {
try {
if (!ServletFileUpload.isMultipartContent(req)) {
return false;
}
DiskFileUpload fu = new DiskFileUpload();
fu.setSizeMax(1000 * 1024 * 512); // 512 K
fu.setSizeThreshold(4096);
fu.setRepositoryPath(\"C:\\temp\\\");
List fileItems = fu.parseRequest(req);//Here I get the list of items
if (fileItems == null) {
return false;
}
Iterator i = fileItems.iterator();
FileItem actual = null;
File fichero = null;
while (i.hasNext()) {
actual = (FileItem) i.next();
if (!actual.isFormField()) {
String fileName = actual.getName();//This name is the \"normal\" one, without any change
fichero = new File(fileName);
fichero = new File(\"C:\\temp\\\" + fichero.getName());
} else {
String fieldName= actual.getFieldName();Here i get a \"Filename\" that i don't have any input in my form with that name... is of Uploadify??
String fieldValue= actual.getString();//Here i get the file name too, but without any change either
}
}
if (fichero != null) {
actual.write(fichero);
} else {
return false;
}
} catch (Exception e) {
return false;
}
return true;
}'script' : 'servlet?id=${bean.idFecha}',