File upload ajax script fails on Safari-Mac

I have a page that allows the user to upload 2 files using AJAX using the jquery.form.js plugin.

This process works well in any other browser, but fails when you try to download the second file on Safari / Mac, only over SSL. The same page in qa env that doesn't use SSL works well in Safari!

Taking a look at the browser logs for the service that is supposed to download the file, I get a 500 Internal Server Error for this attempt.

While debugging on the server, we found that the error was contained in the apache multipart parser package. It seems to be having trouble finding part of the image file.

I couldn't find any information on similar issues and would be very grateful for advice.

Thank!

<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>

      

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

+3


source to share


1 answer


Make sure you have:

enctype="multipart/form-data"

      



in the tag <form>

.

0


source







All Articles