[semi OT] Display problem with pdf files uploaded via Rev cgi
jbv
jbv.silences at club-internet.fr
Fri Jul 11 10:53:37 EDT 2008
Hi again,
If anyone interested, I found the solution.
In the first version of my cgi script, before saving the pdf code as a bin file
on the server, I was running the following loop :
repeat while first char of myPDF = cr
delete first char of myPDF
end repeat
but the wasn't enough; the code to run is :
repeat while first char of myPDF = cr or the chartonum of first char of myPDF = 13
delete first char of myPDF
end repeat
If the pdf code contains some junk before the actual 1st line of pdf
%PDF-1.3 which indicates the file format and the pdf version
IE6+ treats the file as text, while FF seems to check a little further...
Best,
JB
> Hi guys,
>
> Here I am, facing another weird problem...
>
> I have built a js file uploader, with rev cgi on the server side to
> parse
> the multipart/form-data and save the uploaded file in the right
> directory.
> After upload, the end user can check what's been uploaded in a webpage
> where all uploaded files are listed as links in a <table> object.
>
> Everything works like a charm, except for one silly detail : pdf files
> that
> have been uploaded with my tool open as text in the browser, while other
>
> pdf files uploaded via a regular ftp client open fine in Acrobat Reader,
> and
> this happens ONLY in IE6+ on Windows, while any pdf file opens fine in
> Acrobat Reader in FF...
>
> Any suggestion on what I could check (and possibly fix) ?
>
> Thanks in adavance,
> JB
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the use-livecode
mailing list