Re: Re: uploading files... necessary Ajax?
| From: | Jochem Maas | Date: | Wed, 21 Nov 2007 17:27:42 +0000 |
| Subject: | Re: Re: uploading files... necessary Ajax? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-264928@lists.php.net to get a copy of this message | ||
Jay Blanchard wrote:
> [snip]
> So that I can get my head around this, are all of you saying there is
> no Ajax equivalent of:
>
> <form action="index.php" enctype="multipart/form-data"
> method="post">
> <input type="hidden" name="MAX_FILE_SIZE" value="2048000" >
> <input name="userfile" type="file">
> <input type="hidden" name="stage" value="1">
> <input type="submit" value="submit">
>
> We can't in some way use the ajax post method to send the file in the
> background without a refresh (other than using iframe) is that
> correct? Or am I completely missing something here?
> [/snip]
>
> That is correct. Without an IFRAME you cannot upload a file without a
> refresh.
huh? if I post a file to a script that returns a 204 status and nothing else then
the page should not change in the browser.
of course as Colin pointed out this leaves much to be desired in terms of usability
so for practical purposes you'll want to use an Iframe hack or upload widget built
with java or flash.
>