I have a page that allows a user to upload 2 files using AJAX with the help of jquery.form.js plugin.
This process works well on any other browser, but fails when you try to upload the 2nd file on Safari/Mac only, behind SSL. The same page on a qa env that is not using SSL works well in Safari!
Looking at the browser logs for the service that is supposed to upload the file I get a 500 Internal Server Error for that attempt.
When debugging on the server we found out that the error is in the apache multipart request parser. It seems to be having trouble finding the image file part.
I couldn't find any information about similar issues and would greatly appreciate advice.
Thanks!
<form id="fileupload-before" method="post" name="fileupload-before" action="/registration/RegImage.do" enctype="multipart/form-data">
<div id="beforeimageBtn" class="bt_uploadPhoto_holder" replace="bt_uploadPhoto_holder">
<input type="file" name="before" id="fileupload-before-field" onchange='getFilenamebefore();'>
</div>
</form>
<form id="fileupload-after" method="post" name="fileupload-after" action="/registration/RegImage.do" enctype="multipart/form-data">
<div class="bt_uploadPhoto_holder" id="afterimageBtn" replace="bt_uploadPhoto_holder" >
<input type="file" name="after" id="fileupload-after-field" onchange='getFilenameafter();'>
</div>
</form>
(the FILE input fields are hidden (opacity:0) and are served by a button.)
Be sure that you have:
enctype="multipart/form-data"
in your <form>
tag.
name="filename[]"
- John Fable 2012-04-04 21:43