From: richard.townsendrose on
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
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
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
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