Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #16970
| Path | csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Dr J R Stockton <reply1244@merlyn.demon.co.uk.invalid> |
| Newsgroups | comp.lang.javascript |
| Subject | Re: How to validate a file in a javascript |
| Date | Tue, 30 Oct 2012 19:47:31 +0000 |
| Organization | Home |
| Lines | 37 |
| Message-ID | <4B84LdJT7CkQFwc1@invalid.uk.co.demon.merlyn.invalid> (permalink) |
| References | <804583d9-ac09-492c-b488-8989cb13727c@googlegroups.com> <k6k8kh$svj$1@speranza.aioe.org> <b1e733ca-8409-410a-8f74-bf5c9a6014cc@googlegroups.com> <k6lgcv$vth$2@dont-email.me> |
| Mime-Version | 1.0 |
| Content-Type | text/plain;charset=us-ascii |
| Injection-Info | mx04.eternal-september.org; posting-host="530603207bb5dc63eadbc45c88da0024"; logging-data="32590"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18MmjiD6xNsh+AtqAOaeJ1S1P/eHbso96c=" |
| User-Agent | Turnpike/6.05-S (<hY+ExRCkcsssDA9uJ+0bCn8+UA>) |
| Cancel-Lock | sha1:h3b5thiZD7nbkNOtt3tFXh4I5fM= |
| Xref | csiph.com comp.lang.javascript:16970 |
Show key headers only | View raw
In comp.lang.javascript message <k6lgcv$vth$2@dont-email.me>, Mon, 29 Oct 2012 08:57:03, Denis McMahon <denismfmcmahon@gmail.com> posted: >On Sun, 28 Oct 2012 23:32:33 -0700, Katja wrote: > >>> I wouldn't trust on file extensions. As a just a warning for user then >>> >>> it is ok. Just my "5 cents". >>> >> I know but I still need it =) > >Javascript has no direct access to the filesystem. Thus, it can not >reliably determine the size of a file. At best, you can do (sub)string >comparisons and regex checks against a file name entered into a form >field. JScript, in an HTA, running in Internet Explorer in Windows has; and it can be fetched by (I suppose) HTTP and will run with a single additional click. E.G. : <http://www.merlyn.demon.co.uk/programs/32-bit/seek.hta>; after that additional click, press green SEEK and wait a few seconds; it will then give a directory listing (of files since yesterday). I never tried that before (the idea is that a local copy should be run from a command prompt). SEEK - see seakfyle.htm via <http://www.merlyn.demon.co.uk/programs/32-bit/00index.htm> is a functional 32-bit non-equivalent replacement for my 16-bit HUNT, in <http://www.merlyn.demon.co.uk/programs/00index.htm>. They can seek with more discrimination than Microsoft provide; for example one can seek files dated Friday AND between 32kB & 35kB AND name containing Denis. -- (c) John Stockton, nr London, UK. For Mail, see Home Page. Turnpike, WinXP. Web <http://www.merlyn.demon.co.uk/> - FAQ-type topics, acronyms, and links. Command-prompt MiniTrue is useful for viewing/searching/altering files. Free, DOS/Win/UNIX now 2.0.6; see <URL:http://www.merlyn.demon.co.uk/pc-links.htm>.
Back to comp.lang.javascript | Previous | Next — Previous in thread | Find similar | Unroll thread
How to validate a file in a javascript Katja <kate.kokatjuhha@gmail.com> - 2012-10-28 11:56 -0700
Re: How to validate a file in jquery Denis McMahon <denismfmcmahon@gmail.com> - 2012-10-28 21:11 +0000
Re: How to validate a file in a javascript Cezary Tomczyk <cezary.tomczyk@gmail.com> - 2012-10-28 22:38 +0100
Re: How to validate a file in a javascript Katja <kate.kokatjuhha@gmail.com> - 2012-10-28 23:32 -0700
Re: How to validate a file in a javascript Denis McMahon <denismfmcmahon@gmail.com> - 2012-10-29 08:57 +0000
Re: How to validate a file in a javascript Cezary Tomczyk <cezary.tomczyk@gmail.com> - 2012-10-29 15:20 +0100
Re: How to validate a file in a javascript Denis McMahon <denismfmcmahon@gmail.com> - 2012-10-29 23:22 +0000
Re: How to validate a file in a javascript Jeff North <jnorthau@yahoo.com.au> - 2012-10-30 17:11 +1100
Re: How to validate a file in a javascript Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-11-01 21:51 +0100
Re: How to validate a file in a javascript Dr J R Stockton <reply1244@merlyn.demon.co.uk.invalid> - 2012-10-30 19:47 +0000
csiph-web