Empty server response

Hello. I have problem with swfupload. When I upload ZIP archive, after uploading it is processed about 40 seconds on server and after all server send response. When I use , tags then all right:

http://storage.airs0urce.com/browser.png

but when I use swfupload, response is empty (but ZIP is processed):

http://storage.airs0urce.com/flash.png

Any ideas, please. Thanks!

gyphie's picture

Timeout

Unfortunately the Flash Player closes the connection prematurely if no response is received after 30 seconds. I suspect you are hitting this timeout.

The work around is to return data before the 30 second timeout. I have successfully kept the connection open for several minutes by returning a single character (and flushing the buffer) every 20 seconds. After processing I send the normal response and then in uploadSuccess (in the browser) I strip off those leading "timeout prevention" characters.

This may be more difficult in PHP where you don't have a good framework for working with threads (or non-blocking function calls).

One good suggestion I saw is to upload the file and simply save it without lengthy processing. Then have JavaScript call a second script that processes the now saved file. Since the browser doesn't have this timeout "bug" you skirt the issue.

Thanks

Thank you. I will use last suggestion with AJAX