[
https://issues.apache.org/jira/browse/WICKET-4740?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13446875#comment-13446875
]
Ian Blavins commented on WICKET-4740:
-------------------------------------
I can narrow this down a bit. I found that file upload works in my environment
if I use an AjaxSubmitLink. In fact if I attach an AjaxSubmitListener to the
same form that I used to test the non-Ajax file upload, and share the
post-upload processing, then the AjaxSubmitLink version works and the non-Ajax
file upload fails. So there is nothing inherently wrong with file upload in the
environment, or my processing of the upload. The problem is squarely with the
FileUploadField getFileUpload() method. If the method is invoked in the
onSubmit method of an AjaxSubmitLink after the AjaxSubmitLink has been pressed
then the method returns a non-null FileUpload. If the method is invoked in the
onSubmit method of the exact same form after the form Submit button has been
pressed then the method returns a non FileUpload. In both cases the same client
side file was selected for upload and correctly displayed as selected.
Note that both getFileUploads and getFileUpload return null in the form
OnSubmit method.
> File upload fails with server on Mac OS 10.6(.8)
> ------------------------------------------------
>
> Key: WICKET-4740
> URL: https://issues.apache.org/jira/browse/WICKET-4740
> Project: Wicket
> Issue Type: Bug
> Affects Versions: 1.5.7
> Environment: Mac OSX 10.6.8, Glassfish 3.1.2, Safari 5.1.7, Java 1.6;
> client and server co-hosted on same machine
> Reporter: Ian Blavins
>
> After file upload .getFileUploads() on the FileUploadField returns null so no
> file is available for use. The target file is not present in the uploads
> folder.
> I know the client side file is actually read because of the time the request
> takes and that fact that if I try to upload a file bigger than the upload
> file size limit then the check on that trips.
> I have tried small and large files and none upload. I thought having spaces
> in the client side file name might be the issue but unfortunately it isn't.
> There is nothing unusual about the files I have tried - PDF and .txt.
> I have tried different target upload folders to ensure there isn't a
> permission problem or similar in actually placing the uploaded file.
> I have experienced this with a ported version of the file upload example at
> http://www.wicket-library.com/wicket-examples/upload and a hand coded example
> cut and pasted into a working application. The ported example had minimal
> changes.
> I believe this is a server side problem. If I use the same Safari browser to
> execute the wicket file upload example at
> http://www.wicket-library.com/wicket-examples/upload/single?1 online then the
> upload (to the Wicket example server) works fine. I can't tell what the
> Wicket example server is running on but I somehow doubt its Mac OS X 10.6.8
> and Glassfish 3.1.2.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira