Search

This issue has been discussed a long time ago without any solution. But it’s still around.

File uploads using Safari work most of the time, but sometimes they seem to “hang”. In the latter case it is sometimes possible to interrupt page load and restart the upload. Sometimes even this doesn’t work, because the file has already been saved (without stopping the page load wheel from turning or filling the database correctly). In this rare case you will have to delete the file from the server and re-upload again.

Any ideas on this?

[EDIT]: This happens to me with different upload fields, even using the Mediathek extension.

This consistently happens with me but only on local XAMPP sites. I have to hit the submit button, then it will sit there loading the page forever unless I hit submit a second time or press refresh to submit the form again.

What server are you using michael-e?

I’ve found it’s a general problem with file uploads in Safari. If I ever have to upload something of relatively large size I’ll switch to Firefox :/

What server are you using michael-e?

Makes no difference - local, webspaces, Debian servers…

I’ve found it’s a general problem with file uploads in Safari.

Are you sure? In this case I would have expected Apple to care for it in the meantime.

I have experienced some general networking issues with Safari in special LANs, so surely Safari is special. The upload problem might me a combination of timeouts or something like that. In this case there might be a solution on the server side as well.

Are you sure?

Definitely, if you Google for “safari file upload hang” you’ll get whole heap of results. There’s a fix mentioned on the the Airblade Software blog that basically boils down to calling an empty page via AJAX that has the Connection: close header set. Somewhere else said you can also set that header on the page that contains the form you’re submitting to get around the problem.

Makenosound, thank you very much!!!

No probs, mate. As it’s been around for the last 2 or 3 versions of Safari I wonder if it’s worth adding to the core, any opinions on that Sym-team?

It should as well be possible to write an extension based on the code in the Airblade blog, translating it to jQuery speak. You could trigger the function on form submits using jQuery. The extension might include the “blank page”, a simple PHP page sending the necessary header.

I wish I had more time…

I think I have successfully written an extension which fixes this Safari problem. It will be released tomorrow, after some more testing.

Here it is: http://github.com/michael-e/safari_uploads/tree.

I’ll start another thread.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details