You can not use DiskFileItemFactory in GAE. Gwtupload resolves it using a FileItemFactory which saves the stuff in memcache.
Nevertheless GAE has a buch of constrains in uploading, disk write access, request time, request size, memcache object size, etc which you have to consider. -Manolo On Tue, Apr 27, 2010 at 4:56 PM, laurent <[email protected]> wrote: > hello , > When i choice a file to upload, and i go to the log of gae to watch > the number of uploaded files , it write "taille : 0" and not "taille : > 1" , "taille : 2" ,or ... . > > TopPanel.ui.xml : > <g:AbsolutePanel ui:field="absolutePanel"> > <g:Label text="Choix de la personne :" > ui:field="labPersonOrProjectChoice" /> > <g:ListBox ui:field="personOrProjectChoiceList" /> > <g:Label text="Affecter un projet :" > ui:field="labProjectOrPersonAffectChoice" /> > <g:ListBox ui:field="projectOrPersonAffectChoiceList" /> > <g:FormPanel ui:field="formPanel"> > <g:FileUpload ui:field="singleUploader"/> > </g:FormPanel> > <g:Button text="SUBMIT" ui:field="button"/> > <!-- <gwtUpload:SingleUploader ui:field="singleUploader" > fileInputSize="25" /> --> > </g:AbsolutePanel> > > TopPanel.java : > [...] > formPanel.setAction(GWT.getModuleBaseURL() + "SampleUploadServlet"); > formPanel.setEncoding(FormPanel.ENCODING_MULTIPART); > formPanel.setMethod(FormPanel.METHOD_POST); > > button.addClickHandler(new ClickHandler(){ > > �...@override > public void onClick(ClickEvent event) { > formPanel.submit(); > }}); > > SampleUploadServlet.java : > public void doPost(HttpServletRequest request,HttpServletResponse > response){ > FileItemFactory factory = new DiskFileItemFactory(); > ServletFileUpload upload = new ServletFileUpload(factory); > List<FileItem> fileItems = new ArrayList<FileItem>(); > > try { > fileItems = upload.parseRequest(request); > throw new > IllegalArgumentException(""+fileItems.size()); > > } catch (FileUploadException e) { > e.printStackTrace(); > } > catch(IllegalArgumentException iae){ > throw new IllegalArgumentException("taille : > "+fileItems.size()); > } > } > > public void doGet(HttpServletRequest request,HttpServletResponse > response){ > try { > super.doGet(request, response); > } catch (ServletException e) { > } catch (IOException e) { > } > } > > Thanks for your request > > -- > You received this message because you are subscribed to the Google Groups > "Google Web Toolkit" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/google-web-toolkit?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
