Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 6 of 6 total
Thread Upload Filesize
Wed, Nov 2 2016 1:33 PMPermanent Link

Mark Brooks

Slikware

Avatar

Hi

Anybody know how to check the size of a file (in a file input element) prior to posting to initiate the upload?

Thanks
Mark
Wed, Nov 2 2016 3:57 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Mark,

<< Anybody know how to check the size of a file (in a file input element) prior to posting to initiate the upload? >>

This is probably going to require the FileReader API, which is not currently supported.  However, you could probably work up a JS snippet that does so.

I'll see about adding an external interface to the FileReader API, anyways, though.  We're about to the point where we can dump IE9 support, and then we can start filling in all of the stuff that's been missing due to IE's outdated HTML5 support.

Tim Young
Elevate Software
www.elevatesoft.com
Wed, Nov 2 2016 5:31 PMPermanent Link

Christian Kaufmann

> I'll see about adding an external interface to the FileReader API, anyways, though.  We're about
> to the point where we can dump IE9 support, and then we can start filling in all of the stuff
> that's been missing due to IE's outdated HTML5 support.

I just checked my site for the last month:

IE  -> 6%

inside IE requests version 9 is 0.65%.

So I think you may drop IE 9 support...

cu Christian
Wed, Nov 2 2016 9:46 PMPermanent Link

erickengelke

Tim Young [Elevate Software] wrote:

Mark,

<< Anybody know how to check the size of a file (in a file input element) prior to posting to initiate the upload? >>

>This is probably going to require the FileReader API, which is not currently supported.  However, you could >probably work up a JS snippet that does so.

Hi, I discuss this in my Using EWB book.  I believe none of the browsers support HTML5's upload fully.  But the differences between browsers can be handled by an external library which handles each browser correctly.  The result is a page full of EWB code to get the file and its size and it works in every browser including smart phones.

Erick
Thu, Nov 3 2016 4:51 AMPermanent Link

Mark Brooks

Slikware

Avatar

Tim Young [Elevate Software] wrote:

>>I'll see about adding an external interface to the FileReader API, anyways, though.  We're about to the point where >>we can dump IE9 support, and then we can start filling in all of the stuff that's been missing due to IE's outdated >>HTML5 support.

Appreciated Tim
Thu, Nov 3 2016 4:52 AMPermanent Link

Mark Brooks

Slikware

Avatar

erickengelke wrote:

Hi, I discuss this in my Using EWB book.  I believe none of the browsers support HTML5's upload fully.  But the differences between browsers can be handled by an external library which handles each browser correctly.  The result is a page full of EWB code to get the file and its size and it works in every browser including smart phones.

Tks Erick - will certainly take a look
Image