Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #36920
| Newsgroups | comp.lang.javascript |
|---|---|
| Date | 2019-06-15 03:51 -0700 |
| References | <WLednVoOy_y7jJ7AnZ2dnUU7-U3NnZ2d@westnet.com.au> <7IadnQlzfY0rrZ7AnZ2dnUU7-c3NnZ2d@westnet.com.au> <1ug9xfomqubxh.poxo2zdwj2qu$.dlg@40tude.net> <3330917e-4d17-419a-b74c-d5d4ed902d09@googlegroups.com> <ucadncF7z6xsD5nAnZ2dnUU7-VPNnZ2d@westnet.com.au> |
| Message-ID | <055a188b-a37a-476d-98f5-e471bd96b023@googlegroups.com> (permalink) |
| Subject | Re: fetch with blobs |
| From | Julio Di Egidio <julio@diegidio.name> |
On Saturday, 15 June 2019 08:40:59 UTC+2, Andrew Poulos wrote:
> which means my problem is really, why is Edge not sending the input to a
> PHP script (yet Chrome does)?
Your problem is that you approach things ass-backwards.
> Using this
>
> let formData = new FormData();
> formData.append('asset', blob, name);
>
> fetch(url, {
> method: 'POST',
> body: formData
> })
> .then...
>
> with Chrome, the PHP script correctly recognises the input. With Edge
> the PHP script returns '' for both $_FILES['asset']['error'] and
> file_get_contents('php://input'). Is there something missing from the
> fetch that it needs for PHP to see the input when sent from Edge?
And who said that you can use the Fetch API??
Couldn't you be bothered to look at the browser compatibility table?
<https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API>
RTFM!!
Julio
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
fetch with blobs Andrew Poulos <ap_prog@hotmail.com> - 2019-06-14 13:14 +1000
Re: fetch with blobs Andrew Poulos <ap_prog@hotmail.com> - 2019-06-14 15:29 +1000
Re: fetch with blobs Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2019-06-14 13:06 +0200
Re: fetch with blobs JJ <jj4public@vfemail.net> - 2019-06-14 18:56 +0700
Re: fetch with blobs Julio Di Egidio <julio@diegidio.name> - 2019-06-14 05:54 -0700
Re: fetch with blobs Andrew Poulos <ap_prog@hotmail.com> - 2019-06-15 16:40 +1000
Re: fetch with blobs JJ <jj4public@vfemail.net> - 2019-06-15 14:16 +0700
Re: fetch with blobs Andrew Poulos <ap_prog@hotmail.com> - 2019-06-15 19:02 +1000
Re: fetch with blobs Andrew Poulos <ap_prog@hotmail.com> - 2019-06-15 19:31 +1000
Re: fetch with blobs JJ <jj4public@vfemail.net> - 2019-06-16 15:28 +0700
Re: fetch with blobs Julio Di Egidio <julio@diegidio.name> - 2019-06-16 03:46 -0700
Re: fetch with blobs Julio Di Egidio <julio@diegidio.name> - 2019-06-15 03:51 -0700
Re: fetch with blobs Andrew Poulos <ap_prog@hotmail.com> - 2019-06-16 08:21 +1000
Re: fetch with blobs JJ <jj4public@vfemail.net> - 2019-06-15 14:14 +0700
Re: fetch with blobs Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2019-06-15 12:55 +0200
Re: fetch with blobs Julio Di Egidio <julio@diegidio.name> - 2019-06-15 04:02 -0700
csiph-web