Path: csiph.com!usenet.pasdenom.info!news.albasani.net!newsfeed.straub-nv.de!uucp.gnuu.de!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail Content-Type: text/plain; charset="UTF-8" Message-ID: <6300879.mfXoyHR8pD@PointedEars.de> From: Thomas 'PointedEars' Lahn Reply-To: Thomas 'PointedEars' Lahn Organization: PointedEars Software (PES) Date: Fri, 28 Sep 2012 13:00:55 +0200 User-Agent: KNode/4.4.11 Content-Transfer-Encoding: 8Bit X-Face: %i>XG-yXR'\"2P/C_aO%~;2o~?g0pPKmbOw^=NT`tprDEf++D.m7"}HW6.#=U:?2GGctkL,f89@H46O$ASoW&?s}.k+&. <2953112.VveF1GjdCU@PointedEars.de> <5065817e$0$6883$e4fe514c@news2.news.xs4all.nl> Followup-To: comp.lang.javascript MIME-Version: 1.0 Lines: 37 NNTP-Posting-Date: 28 Sep 2012 13:00:55 CEST NNTP-Posting-Host: 31dd48f6.newsspool1.arcor-online.net X-Trace: DXC=Tf5dc9\CEZl_0Po7BmQ3]lic==]BZ:afn4Fo<]lROoRankgeX?EC@@`IRTKiQcV`1dDZm8W4\YJNlR=i2=[N6Y6j4^f?Ymnoood2RKR9PIQb5n X-Complaints-To: usenet-abuse@arcor.de Xref: csiph.com comp.lang.javascript:16226 Tom de Neef wrote: > "Thomas 'PointedEars' Lahn wrote: >>> Now I come to a point where the content of a file needs to be >>> transmitted, >>> like in: >>> function readLocalFile(file) { >>> var reader = new FileReader(); >>> reader.onload = >>> function(){transmit('origin='+file.name+'&'+this.result)}; >>> reader.readAsBinaryString(file); >>> } >>> >>> Questions: >>> […]1. is this how a file's contents should be passed? >> No. >>> 2. is the content-type still correct? >> No. >>> 3. shouldn't this.result be encapsulated to cope with & and other >>> unwanted >>> chars? >> Yes. It should be URL-encoded instead, unless you gzip it. >>> Or maybe you can point me to an example. I could not find anything >>> useful. >> > > Whow ! Thanks. Any questions as to that? PointedEars -- Use any version of Microsoft Frontpage to create your site. (This won't prevent people from viewing your source, but no one will want to steal it.) -- from (404-comp.)