Prev: bBrowse sample with JPG and TXT [ separate files ] shown in browser
Next: How big is the VO community
From: richard.townsendrose on 19 May 2010 08:24 Hi all From within our software [ tdoc.com ] we are now posting data to a php script. It works well with uploading text file attachments. I now want to enable pdf attachments as well ... this is the code for the part within the boundaries [Content-Disposition: form-data; name="File1"] + CRLF + ; [Content-Type: application/octet-stream] + CRLF + ; [Content-Transfer-Encoding: base64] + CRLF + CRLF + ; B64EncFile("C:\test.pdf") + CRLF + ; the file is attached ok, but adobe doesn't like it ... can anyone see what i am doing wrong ? thanks richard
From: Stephen Quinn on 19 May 2010 09:15 Richard > the file is attached ok, but adobe doesn't like it ... > B64EncFile("C:\test.pdf") Are you sure that the file is decoded correctly at the other end?? Run a binary comparison to see what differences if any. Simplest is to check the filesize at both ends. CYA Steve
From: Norbert Kolb on 19 May 2010 17:33 Richard > B64EncFile("C:\test.pdf") B64EncFile inserts automatically following header: Content-Type: application/pdf; name="test.pdf" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="test.pdf" and is MIME-Protocol. You can't use B64EncFile() for http. Norbert
From: Geoff Schaller on 19 May 2010 17:42
I think Steve has the right point. So much as an additional CR or space will stuff the decode up. Geoff "richard.townsendrose" <richard.townsendrose(a)googlemail.com> wrote in message news:36722d15-1f34-4ab9-b4b0-4b73128ef6c0(a)o1g2000vbe.googlegroups.com: > Hi all > > From within our software [ tdoc.com ] we are now posting data to a php > script. It works well with uploading text file attachments. > > I now want to enable pdf attachments as well ... > this is the code for the part within the boundaries > > [Content-Disposition: form-data; name="File1"] + CRLF + ; > [Content-Type: application/octet-stream] + CRLF + ; > [Content-Transfer-Encoding: base64] + CRLF + CRLF + ; > B64EncFile("C:\test.pdf") + CRLF + ; > > the file is attached ok, but adobe doesn't like it ... > > can anyone see what i am doing wrong ? > > thanks > > richard |