Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #38487

Re: Testing for blob

Newsgroups comp.lang.javascript
Subject Re: Testing for blob
From "Evertjan." <exxjxw.hannivoort@inter.nl.net>
References <C9udnaDXJImnqZnCnZ2dnUU7-KPNnZ2d@westnet.com.au>
Date 2020-07-07 11:33 +0200
Message-ID <XnsABF375980BC82eejj99@194.109.6.166> (permalink)

Show all headers | View raw


Andrew Poulos <ap_prog@hotmail.com> wrote on 07 Jul 2020 in 
comp.lang.javascript:

> I have a function
> 
> function upload(f) {
>    ...
>}
> 
> if within the function I add
> 
> console.log(f, f instanceof Blob);
> 
> I get
> 
> BlobĀ {size: 16231, type: "audio/mpeg-3"} false
> 
> I don't understand how f can be a blob but not be an instance of Blob.
> 
> At any rate the deeper problem I have is to be able to distinguish 
> whether f is a blob (from new Blob) or a file (from an input of 
> type="file").
> 
> Andrew Poulos

Could be a timing problem, in the sense of "notjet a blob".

So try again later, with a timeout or an onclick.


-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Testing for blob Andrew Poulos <ap_prog@hotmail.com> - 2020-07-07 18:37 +1000
  Re: Testing for blob "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2020-07-07 11:33 +0200
    Re: Testing for blob "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2020-07-07 11:48 +0200
  Re: Testing for blob Julio Di Egidio <julio@diegidio.name> - 2020-07-07 23:44 -0700
    Re: Testing for blob Julio Di Egidio <julio@diegidio.name> - 2020-07-07 23:48 -0700
    Re: Testing for blob Andrew Poulos <ap_prog@hotmail.com> - 2020-07-08 17:42 +1000

csiph-web