Issue Details (XML | Word | Printable)

Key: LEP-6412
Type: Bug Bug
Status: Open Open
Priority: Critical Critical
Assignee: SE Support
Reporter: Carlo Cavallieri
Votes: 0
Watchers: 4
Operations

If you were logged in you would be able to see more operations.
Old Liferay Portal (Use Liferay Portal Standard Edition)

Upload file doesn't work in sample-struts-portlet-5.0.0.1.war

Created: 24/Jun/08 02:22 AM   Updated: 22/Oct/08 05:26 PM
Component/s: None
Affects Version/s: 5.1.0
Fix Version/s: None

Time Tracking:
Not Specified

Environment:
Windows xp
tomcat 6
jdk 1.6_04


 Description  « Hide
In the sample apache sturts bridge the upload seems to not work as expected;

when i upload a file the following code return a zero list items instead of one item:

ServletFileUpload upload = new ServletFileUpload(factory);
List items = upload.parseRequest(req);

 All   Comments   Work Log   Change History   FishEye      Sort Order: Ascending order - Click to sort in descending order
Arcko Duan added a comment - 25/Jun/08 09:39 PM
Issue reproduced in portal trunk and plugin trunk.

Christoph Hermann added a comment - 06/Jul/08 08:04 AM - Visible to
I have the same problem. The Upload which worked fine in Liferay 4.4.1 is not working anymore in Liferay 5.0.1.
Please provide a fix to this ASAP, this is really critical.

The following code illustrates the problem:

------------
DiskFileItemFactory factory = new DiskFileItemFactory();
factory.setRepository(new File("/tmp/"));
ServletFileUpload upload = new ServletFileUpload(factory);
// Parse the request
List<FileItem> items = (List<FileItem>) upload.parseRequest(httpRequest);
if (items != null) {
  _log.debug("Found " + items.size() + " file items in the request");
} else {
  _log.debug("Found no file items in the request");
}
------------
This always returns 0 items.

See also http://support.liferay.com/browse/LEP-6479

Marian Simpetru added a comment - 13/Aug/08 04:47 AM - Visible to
Struts sample portlet -- upload feture -- also does not work on 5.1.1
same issue since 4.4.2 code change i guess.
this one affects any struts based portlet that tries to make uploads...

console shows for struts sample portlet - upload:

ERROR [UploadServletRequestImpl:111] the request doesn't contain a multipart/form-data or multipart/mixed stream, content type header is null