views:

57

answers:

3

Let's say that I upload a file using a basic multipart post. The server then receives the request and starts to execute the server side code. Can I somehow in that state start to output the response and after some data is sent start to receive the file? Finally when the file is uploaded I output the rest of the response.

If this is possible I can display file upload progress without using ajax?

I guess this might depend on what I run server side. But let's assume that I have full network control.

A: 
The MYYN
That's a *huge* misnomer...seeing as it *has* to have a server-side component :)
Nick Craver
That solution involves constantly refreshing the page and I really don't want to do that. I simply want to start to output some html and some javascript then receive the file and at last output the rest of the html
picknick
You want to do it without AJAX, but with html and javascript? Then... why no AJAX? In any case, you could create a fake progress monitor in javascript estimating the time, but without information about connection speed and upload progress, you risk being dead off.
Konerak
A: 

Why not just display a spinning icon? Google Image Search

Matthew Smith
Sure I can do that but I want to show the actual progress. to clarify I want to. 1. send request. 2. Output data (html and javascript). 3. receive part of file. 4. Output data. 5. receive part of file 6. Output data. 7. receive the last part of file 6. Output the rest of the html.
picknick
A: 

It's not AJAX-free but it seems to do everything else you want. At the very least you might be able to reverse engineer a solution more to your liking...

http://digitarald.de/project/fancyupload/

Matthew Smith