Ajax file upload script fails in Safari-Mac

Go To StackoverFlow.com


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.


<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();'>

<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();'>

(the FILE input fields are hidden (opacity:0) and are served by a button.)

2012-04-04 19:55
by user1313723


Be sure that you have:


in your <form> tag.

2012-04-04 20:00
by John Fable
I do have it. as well as method="post" and form name - user1313723 2012-04-04 20:12
Are you file input fields the same name? Or an array like name="filename[]" - John Fable 2012-04-04 21:43
No. 2 different forms. i will add my code in my original pos - user1313723 2012-04-04 21:54
any luck, how did you solve it - meso_2600 2015-09-15 13:41